Skip to content

Commit

Permalink
[INDY-1165] Added check, that proofs already received
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Nikitin <[email protected]>
  • Loading branch information
Andrew Nikitin committed Mar 2, 2018
1 parent f4a5fa8 commit 92ae86a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plenum/common/ledger_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,14 @@ def request_CPs_if_needed(self, ledgerId):
if ledgerInfo.consistencyProofsTimer is None:
return

proofs = ledgerInfo.recvdConsistencyProofs
# there is no any received ConsistencyProofs
if not proofs:
return
logger.debug("{} requesting consistency "
"proofs after timeout".format(self))

quorum = Quorums(self.owner.totalNodes)
proofs = ledgerInfo.recvdConsistencyProofs
groupedProofs, null_proofs_count = self._groupConsistencyProofs(proofs)
if quorum.same_consistency_proof.is_reached(null_proofs_count):
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ def limitTestRunningTime():
def tconf(tconf):
old_vc_timeout = tconf.VIEW_CHANGE_TIMEOUT
old_max_reconnect_retry = tconf.MAX_RECONNECT_RETRY_ON_SAME_SOCKET
old_retry_timeout = tconf.RETRY_TIMEOUT_RESTRICTED
tconf.MAX_RECONNECT_RETRY_ON_SAME_SOCKET = 0
tconf.VIEW_CHANGE_TIMEOUT = 15
tconf.RETRY_TIMEOUT_RESTRICTED = 5

yield tconf

tconf.VIEW_CHANGE_TIMEOUT = old_vc_timeout
tconf.MAX_RECONNECT_RETRY_ON_SAME_SOCKET = old_max_reconnect_retry
tconf.RETRY_TIMEOUT_RESTRICTED = old_retry_timeout


def catchuped(node):
Expand Down

0 comments on commit 92ae86a

Please sign in to comment.