mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-02 09:46:14 +00:00
Merge bitcoin/bitcoin#34528: test: Fix intermittent failure in feature_assumevalid.py by ensuring invalid block was processed before checking debug.log
b73a62f667d0220a5700a02e11736684d2214b04 test: Ensure invalid block was processed before checking debug.log (Ava Chow)
Pull request description:
Prior to merging a PR, I run 4 different build configurations and their tests in parallel, and consistently one of those will have `feature_assumevalid.py` fail. The failure is because the `assert_debug_log` context exits before the invalid block is processed, so the lines it is looking for don't appear in the part of the log that it is examining.
This PR should resolve that issue by waiting for `getchaintips` to report that the invalid chain is invalid before exiting the `assert_debug_log` context.
ACKs for top commit:
l0rinc:
tested ACK b73a62f667d0220a5700a02e11736684d2214b04
sedited:
ACK b73a62f667d0220a5700a02e11736684d2214b04
Tree-SHA512: 96409ed55f686961c47949d31569d6be8e424d952883c92a9135a4e8a795047d4e2a86c9d27ef5653d21780717275434b0bca1586059cfd5088cd2c867c7baea
This commit is contained in:
commit
b2805eec35
@ -164,6 +164,7 @@ class AssumeValidTest(BitcoinTestFramework):
|
||||
self.send_blocks_until_disconnected(p2p0)
|
||||
self.wait_until(lambda: self.nodes[0].getblockcount() >= COINBASE_MATURITY + 1)
|
||||
assert_equal(self.nodes[0].getblockcount(), COINBASE_MATURITY + 1)
|
||||
self.wait_until(lambda: next(filter(lambda x: x["hash"] == self.blocks[-1].hash_hex, self.nodes[0].getchaintips()))["status"] == "invalid")
|
||||
|
||||
|
||||
# nodes[1]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user