Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-mempool-coherence-on-activations.py
Show First 20 Lines • Show All 353 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
reorg_blocks = [] | reorg_blocks = [] | ||||
for i in range(3): | for i in range(3): | ||||
reorg_blocks.append(block(5900 + i)) | reorg_blocks.append(block(5900 + i)) | ||||
# Perform the reorg | # Perform the reorg | ||||
node.p2p.send_blocks_and_test(reorg_blocks, node) | node.p2p.send_blocks_and_test(reorg_blocks, node) | ||||
# reorg finishes after the fork | # reorg finishes after the fork | ||||
assert_equal(node.getblockheader(node.getbestblockhash())['mediantime'], | assert_equal(node.getblockheader(node.getbestblockhash())['mediantime'], | ||||
ACTIVATION_TIME+2) | ACTIVATION_TIME + 2) | ||||
# In old mempool: tx_chain2, tx_post1 | # In old mempool: tx_chain2, tx_post1 | ||||
# Recovered from blocks: tx_chain0, tx_chain1, tx_post0 | # Recovered from blocks: tx_chain0, tx_chain1, tx_post0 | ||||
# Lost from blocks: tx_pre0 | # Lost from blocks: tx_pre0 | ||||
# Retained from old mempool: tx_chain2, tx_post1 | # Retained from old mempool: tx_chain2, tx_post1 | ||||
# Evicted from old mempool: NONE | # Evicted from old mempool: NONE | ||||
check_mempool_equal( | check_mempool_equal( | ||||
[tx_chain0, tx_chain1, tx_chain2, tx_post0, tx_post1]) | [tx_chain0, tx_chain1, tx_chain2, tx_post0, tx_post1]) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
MempoolCoherenceOnActivationsTest().main() | MempoolCoherenceOnActivationsTest().main() |