Skip to content

Commit

Permalink
qa: correct reorg_shit function to use given height
Browse files Browse the repository at this point in the history
It was using the passed height for all other calculation, except for the
invalidation itself where it was using the wider-scope-initial-tip! This
is probably a mistake due to moving it to its own, inner, function.
  • Loading branch information
darosior committed Sep 11, 2024
1 parent cfcbd1e commit af5ca6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def reorg_shift(height, txs):
"""Remine the chain from given height, shifting the txs by one block."""
delta = bitcoind.rpc.getblockcount() - height + 1
assert delta > 2
h = bitcoind.rpc.getblockhash(initial_tip["height"])
h = bitcoind.rpc.getblockhash(height)
bitcoind.rpc.invalidateblock(h)
bitcoind.generate_block(1)
for tx in txs:
Expand Down

0 comments on commit af5ca6a

Please sign in to comment.