diff --git a/blockchain_parser/blockchain.py b/blockchain_parser/blockchain.py index 23e7411..3281b05 100644 --- a/blockchain_parser/blockchain.py +++ b/blockchain_parser/blockchain.py @@ -206,7 +206,7 @@ def get_ordered_blocks(self, index, start=0, end=None, cache=None): # that have been confirmed # (or are new enough that they haven't yet been confirmed) blockIndexes = list(filter(lambda block: block.hash not in stale_blocks, blockIndexes)) - + blockIndexes.sort(key= lambda b: b.height) if end is None: end = len(blockIndexes)