off by one

This commit is contained in:
Jack Robison 2020-12-01 17:37:59 -05:00
parent ede167bb56
commit aa0f49633a
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -285,7 +285,7 @@ def tx_merkle(tx_num, tx_height):
prefix=TX_HASH_PREFIX,
start=TX_HASH_PREFIX + util.pack_be_uint64(tx_counts[tx_height - 1]),
stop=None if tx_height + 1 == len(tx_counts) else
TX_HASH_PREFIX + util.pack_be_uint64(tx_counts[tx_height]), include_key=False
TX_HASH_PREFIX + util.pack_be_uint64(tx_counts[tx_height] - 1), include_key=False
))
if tx_height + 100 <= db_height:
ctx.block_txs_cache[tx_height] = block_txs