diff --git a/test/functional/p2p_compactblocks.py b/test/functional/p2p_compactblocks.py index 0d44943d6f3..724a5874373 100755 --- a/test/functional/p2p_compactblocks.py +++ b/test/functional/p2p_compactblocks.py @@ -744,6 +744,13 @@ class CompactBlocksTest(BitcoinTestFramework): assert_not_equal(node.getbestblockhash(), block.hash_hex) test_node.sync_with_ping() + # The failure above was cached. Submitting the compact block again will returned a cached + # consensus error (the code path is different) and still not get us disconnected (nor + # advance the tip). + test_node.send_and_ping(msg) + assert_not_equal(node.getbestblockhash(), block.hash_hex) + test_node.sync_with_ping() + # Helper for enabling cb announcements # Send the sendcmpct request and sync headers def request_cb_announcements(self, peer):