aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-05 04:47:17 +0800
committerMarcoFalke <falke.marco@gmail.com>2020-04-05 04:47:21 +0800
commit490ae0e87b9abf74f5804852e4a52e368b40478a (patch)
tree065ea45c3e89e403c5c9ea4af7596cfbd69b9a0e /test
parenta3b61cf6416387eaac568b53451a0aebe128dfe1 (diff)
parent3dc8c012f0a40756f3c4359dbe169c03d7c8a725 (diff)
Merge #18520: test: remaining replacements of (send_message+sync_with_ping) with send_and_ping
3dc8c012f0a40756f3c4359dbe169c03d7c8a725 test: remaining replacements of (send_message+sync_with_ping) with send_and_ping (Sebastian Falbesoner) Pull request description: This is a tiny follow-up PR to #18494, substituting the remaining occurences of `send_message(...)`/`sync_with_ping(...)` pairs with `send_and_ping(...)`, as suggested in the comment https://github.com/bitcoin/bitcoin/pull/18494#pullrequestreview-386418913. Thanks to jonatack and [MarcoFalke](https://github.com/bitcoin/bitcoin/pull/18494#issuecomment-608496342) for giving me the hint to do this follow-up. ACKs for top commit: practicalswift: ACK 3dc8c012f0a40756f3c4359dbe169c03d7c8a725 Tree-SHA512: 44d64332933c23a7f59c0415e008ce1b2b2e07177f81cb9473b7c71558188f1c698e8973de5cc940280e4697f9553af852d9a42841304f82469673d1c8162852
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/p2p_segwit.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py
index 118f31382a..d8dce7fe56 100755
--- a/test/functional/p2p_segwit.py
+++ b/test/functional/p2p_segwit.py
@@ -125,8 +125,7 @@ def test_transaction_acceptance(node, p2p, tx, with_witness, accepted, reason=No
- use the getrawmempool rpc to check for acceptance."""
reason = [reason] if reason else []
with node.assert_debug_log(expected_msgs=reason):
- p2p.send_message(msg_tx(tx) if with_witness else msg_no_witness_tx(tx))
- p2p.sync_with_ping()
+ p2p.send_and_ping(msg_tx(tx) if with_witness else msg_no_witness_tx(tx))
assert_equal(tx.hash in node.getrawmempool(), accepted)
@@ -137,8 +136,7 @@ def test_witness_block(node, p2p, block, accepted, with_witness=True, reason=Non
- use the getbestblockhash rpc to check for acceptance."""
reason = [reason] if reason else []
with node.assert_debug_log(expected_msgs=reason):
- p2p.send_message(msg_block(block) if with_witness else msg_no_witness_block(block))
- p2p.sync_with_ping()
+ p2p.send_and_ping(msg_block(block) if with_witness else msg_no_witness_block(block))
assert_equal(node.getbestblockhash() == block.hash, accepted)