Skip to content

Commit

Permalink
Removed unofficial state
Browse files Browse the repository at this point in the history
  • Loading branch information
gdanezis committed Nov 12, 2017
1 parent a99d844 commit cd5da4c
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions pybft/replica.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ def __init__(self,i, R):
self.seqno_i = 0
self.last_exec_i = 0

# Not quite the official state, but useful
# to schedule internal things.
self.mnv_store = {}

# Utility functions

def valid_sig(self, i, m):
Expand Down Expand Up @@ -211,11 +207,6 @@ def receive_new_view(self, msg):
self.in_i |= (O | N | P)
self.in_i.add(msg)
self.out_i |= P

# Update unofficial
for (mi, vi, ni) in new_mvn:
self.mnv_store[(vi, ni)] = mi

return True
else:
return False
Expand Down Expand Up @@ -243,8 +234,6 @@ def send_preprepare(self, m, v, n):
self.out_i.add(p)
self.in_i.add(p)

# Unofficial state
self.mnv_store[(v,n)] = m
return True
else:
return False
Expand Down Expand Up @@ -442,11 +431,9 @@ def route_receive(self, msg):
all_preps = sorted(all_preps, key=lambda xmsg: xmsg[2])

for (_, vx, nx, mx, _) in all_preps:
# v,n,m = prep[1:4]
self.send_commit(mx,vx,nx)
self.execute(mx,vx,nx)
# n += 1


def _debug_status(self, request):
# First check out if the request has been received:
print("\nPeer %s (view: %s) REQ: %s" % (self.i, self.view_i, str(request)))
Expand Down

0 comments on commit cd5da4c

Please sign in to comment.