aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-09-26 12:55:16 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-09-26 12:55:19 +0200
commit8aa3a4a498742dc42631956ed3599b3fb2b80302 (patch)
tree7305c1b2673a882bf287144f049516716e361a25
parent78f912c9010f686e2d1bbdc1c51f381b496c2a1b (diff)
parent0fcaf731997c4989b869e42d8990f742637799c2 (diff)
downloadbitcoin-8aa3a4a498742dc42631956ed3599b3fb2b80302.tar.xz
Merge #20022: test: use explicit p2p objects where available
0fcaf731997c4989b869e42d8990f742637799c2 test: use explicit p2p objects where available (Oliver Gugger) Pull request description: This is a follow-up patch to #19804 as suggested by MarcoFalke (https://github.com/bitcoin/bitcoin/pull/19804#discussion_r494950062). 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 0fcaf731997c4989b869e42d8990f742637799c2 Tree-SHA512: 37db22185077beeadfa7245bb768b87d6b7a2cfb906c3c859ab92ec3d657122db7301777f0838e13dfc748f37303850144fb7553e6cb6c66903e304d6e10e659
-rwxr-xr-xtest/functional/p2p_getdata.py2
-rwxr-xr-xtest/functional/wallet_resendwallettransactions.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/p2p_getdata.py b/test/functional/p2p_getdata.py
index 51921a8ab5..89d68d5ba0 100755
--- a/test/functional/p2p_getdata.py
+++ b/test/functional/p2p_getdata.py
@@ -42,7 +42,7 @@ class GetdataTest(BitcoinTestFramework):
good_getdata = msg_getdata()
good_getdata.inv.append(CInv(t=2, h=best_block))
p2p_block_store.send_and_ping(good_getdata)
- p2p_block_store.wait_until(lambda: self.nodes[0].p2ps[0].blocks[best_block] == 1)
+ p2p_block_store.wait_until(lambda: p2p_block_store.blocks[best_block] == 1)
if __name__ == '__main__':
diff --git a/test/functional/wallet_resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py
index ca1039092d..d3c03c4764 100755
--- a/test/functional/wallet_resendwallettransactions.py
+++ b/test/functional/wallet_resendwallettransactions.py
@@ -58,7 +58,7 @@ class ResendWalletTransactionsTest(BitcoinTestFramework):
two_min = 2 * 60
node.setmocktime(now + twelve_hrs - two_min)
time.sleep(2) # ensure enough time has passed for rebroadcast attempt to occur
- assert_equal(int(txid, 16) in node.p2ps[1].get_invs(), False)
+ assert_equal(int(txid, 16) in peer_second.get_invs(), False)
self.log.info("Bump time & check that transaction is rebroadcast")
# Transaction should be rebroadcast approximately 24 hours in the future,