Skip to content

Commit 0fcaf73

Browse files
committed
test: use explicit p2p objects where available
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.
1 parent 78f912c commit 0fcaf73

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/functional/p2p_getdata.py

+1-1
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

+1-1
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)