Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix none finalised reqs in case of not participating #574

Merged
merged 2 commits into from
Mar 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions plenum/server/replica.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,16 +860,16 @@ def can_process_since_view_change_in_progress(self, msg):

def _process_valid_preprepare(self, pre_prepare, sender):
# TODO: rename to apply_pre_prepare
old_state_root = self.stateRootHash(pre_prepare.ledgerId, to_str=False)
why_not_applied = self._apply_pre_prepare(pre_prepare, sender)
if why_not_applied is not None:
return why_not_applied
key = (pre_prepare.viewNo, pre_prepare.ppSeqNo)
self.addToPrePrepares(pre_prepare)
if not self.node.isParticipating:
self.stashingWhileCatchingUp.add(key)
self.logger.warning('{} stashing PRE-PREPARE{}'.format(self, key))
return None
old_state_root = self.stateRootHash(pre_prepare.ledgerId, to_str=False)
why_not_applied = self._apply_pre_prepare(pre_prepare, sender)
if why_not_applied is not None:
return why_not_applied
self.addToPrePrepares(pre_prepare)
if self.isMaster:
# TODO: can old_state_root be used here instead?
state_root = self.stateRootHash(pre_prepare.ledgerId, to_str=False)
Expand Down