Skip to content

Commit 8aa3a4a

Browse files
author
MarcoFalke
committed
Merge #20022: test: use explicit p2p objects where available
0fcaf73 test: use explicit p2p objects where available (Oliver Gugger) Pull request description: This is a follow-up patch to #19804 as suggested by MarcoFalke (bitcoin/bitcoin#19804 (comment)). To make the intent of the tests easier to understand, we reference the p2p connection objects by their explicit names instead of the p2ps array. ACKs for top commit: theStack: ACK 0fcaf73 Tree-SHA512: 37db22185077beeadfa7245bb768b87d6b7a2cfb906c3c859ab92ec3d657122db7301777f0838e13dfc748f37303850144fb7553e6cb6c66903e304d6e10e659
2 parents 78f912c + 0fcaf73 commit 8aa3a4a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/functional/p2p_getdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def run_test(self):
4242
good_getdata = msg_getdata()
4343
good_getdata.inv.append(CInv(t=2, h=best_block))
4444
p2p_block_store.send_and_ping(good_getdata)
45-
p2p_block_store.wait_until(lambda: self.nodes[0].p2ps[0].blocks[best_block] == 1)
45+
p2p_block_store.wait_until(lambda: p2p_block_store.blocks[best_block] == 1)
4646

4747

4848
if __name__ == '__main__':

test/functional/wallet_resendwallettransactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run_test(self):
5858
two_min = 2 * 60
5959
node.setmocktime(now + twelve_hrs - two_min)
6060
time.sleep(2) # ensure enough time has passed for rebroadcast attempt to occur
61-
assert_equal(int(txid, 16) in node.p2ps[1].get_invs(), False)
61+
assert_equal(int(txid, 16) in peer_second.get_invs(), False)
6262

6363
self.log.info("Bump time & check that transaction is rebroadcast")
6464
# Transaction should be rebroadcast approximately 24 hours in the future,

0 commit comments

Comments
 (0)