0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

Merge bitcoin/bitcoin#26404: test: fix intermittent failure in rpc_getblockfrompeer.py

8a9f1e4d18 test: fix intermittent failure in rpc_getblockfrompeer.py (Martin Zumsande)

Pull request description:

  Fixes an intermittent failure in `rpc_getblockfrompeer.py` observed in https://cirrus-ci.com/task/6610115527704576 by adding a sync to make sure the node has processed the header we sent it before we query it for the corresponding block.

  Fixes #26412

ACKs for top commit:
  jonatack:
    ACK 8a9f1e4d18

Tree-SHA512: f6188ab3cfd863034e44e9806d0d99a8781462bec94141501aefc71589153481ffb144e126326ab81807c2b2c93de7f4aac5d09dbcf26c4512a176e06fc6e5f8
This commit is contained in:
MacroFake 2022-10-29 11:14:06 +02:00
commit 4f270d2b63
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -100,7 +100,7 @@ class GetBlockFromPeerTest(BitcoinTestFramework):
# Connect a P2PInterface to the pruning node and have it submit only the header of the
# block that the pruning node has not seen
node1_interface = self.nodes[1].add_p2p_connection(P2PInterface())
node1_interface.send_message(msg_headers([block]))
node1_interface.send_and_ping(msg_headers([block]))
# Get the peer id of the P2PInterface from the pruning node
node1_peers = self.nodes[1].getpeerinfo()