Skip to content

Commit

Permalink
INDY-917: Fixed bug in Upgrader.get_upgrade_txn (hyperledger#416)
Browse files Browse the repository at this point in the history
Fixed a bug with wrong search boundaries in Upgrader.get_upgrade_txn method.

Signed-off-by: Nikita Spivachuk <[email protected]>
  • Loading branch information
spivachuk authored and andkononykhin committed Oct 24, 2017
1 parent 90b3049 commit a01647b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indy_node/server/upgrader.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ def txn_filter(txn):
def traverse_end_condition(seq_no):
if reverse:
return seq_no > 0
return seq_no < len(self.ledger)
return seq_no <= len(self.ledger)

inc = 1
init_start_no = 0
init_start_no = 1
if reverse:
inc = -1
init_start_no = len(self.ledger)
Expand Down

0 comments on commit a01647b

Please sign in to comment.