mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge bitcoin/bitcoin#25124: test: Fix intermittent race in p2p_unrequested_blocks.py
faac67cab02a755b0ce67716c5e5889432b13b83 test: Fix intermittent race in p2p_unrequested_blocks.py (MacroFake)
Pull request description:
Disconnect may also result in an `OSError`, not only an `AssertionError`. Instead of maintaining a dead code path and enumerating disconnect reasons, just assume disconnection happens every time.
ACKs for top commit:
jamesob:
Code review ACK faac67cab0
Tree-SHA512: d2cec003168e421a5faed275cb2e1ef9fc63f9e8514f41d21da17e8964c79e5b453ccd72cd7ec62805f45293cf877be5bc8124ae98a515c0aa42d6e053409653
This commit is contained in:
parent
49d4c56cd5
commit
b3343d73ab
@ -254,12 +254,7 @@ class AcceptBlockTest(BitcoinTestFramework):
|
|||||||
test_node.send_message(msg_block(block_291))
|
test_node.send_message(msg_block(block_291))
|
||||||
|
|
||||||
# At this point we've sent an obviously-bogus block, wait for full processing
|
# At this point we've sent an obviously-bogus block, wait for full processing
|
||||||
# without assuming whether we will be disconnected or not
|
# and assume disconnection
|
||||||
try:
|
|
||||||
# Only wait a short while so the test doesn't take forever if we do get
|
|
||||||
# disconnected
|
|
||||||
test_node.sync_with_ping(timeout=1)
|
|
||||||
except AssertionError:
|
|
||||||
test_node.wait_for_disconnect()
|
test_node.wait_for_disconnect()
|
||||||
|
|
||||||
self.nodes[0].disconnect_p2ps()
|
self.nodes[0].disconnect_p2ps()
|
||||||
|
Loading…
Reference in New Issue
Block a user