Skip to content

Commit 549d30f

Browse files
committed
scripted-diff: replace p2p with p2ps[0] in p2p_invalid_tx
-BEGIN VERIFY SCRIPT- sed -i 's/\.p2p\./.p2ps[0]./g' test/functional/p2p_invalid_tx.py -END VERIFY SCRIPT-
1 parent 7a0de46 commit 549d30f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/functional/p2p_invalid_tx.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def run_test(self):
6161
# Save the coinbase for later
6262
block1 = block
6363
tip = block.sha256
64-
node.p2p.send_blocks_and_test([block], node, success=True)
64+
node.p2ps[0].send_blocks_and_test([block], node, success=True)
6565

6666
self.log.info("Mature the block.")
6767
self.nodes[0].generatetoaddress(100, self.nodes[0].get_deterministic_priv_key().address)
@@ -72,7 +72,7 @@ def run_test(self):
7272
self.log.info("Testing invalid transaction: %s", BadTxTemplate.__name__)
7373
template = BadTxTemplate(spend_block=block1)
7474
tx = template.get_tx()
75-
node.p2p.send_txs_and_test(
75+
node.p2ps[0].send_txs_and_test(
7676
[tx], node, success=False,
7777
expect_disconnect=template.expect_disconnect,
7878
reject_reason=template.reject_reason,
@@ -121,7 +121,7 @@ def run_test(self):
121121

122122
self.log.info('Send the orphans ... ')
123123
# Send valid orphan txs from p2ps[0]
124-
node.p2p.send_txs_and_test([tx_orphan_1, tx_orphan_2_no_fee, tx_orphan_2_valid], node, success=False)
124+
node.p2ps[0].send_txs_and_test([tx_orphan_1, tx_orphan_2_no_fee, tx_orphan_2_valid], node, success=False)
125125
# Send invalid tx from p2ps[1]
126126
node.p2ps[1].send_txs_and_test([tx_orphan_2_invalid], node, success=False)
127127

@@ -130,7 +130,7 @@ def run_test(self):
130130

131131
self.log.info('Send the withhold tx ... ')
132132
with node.assert_debug_log(expected_msgs=["bad-txns-in-belowout"]):
133-
node.p2p.send_txs_and_test([tx_withhold], node, success=True)
133+
node.p2ps[0].send_txs_and_test([tx_withhold], node, success=True)
134134

135135
# Transactions that should end up in the mempool
136136
expected_mempool = {
@@ -155,14 +155,14 @@ def run_test(self):
155155
orphan_tx_pool[i].vout.append(CTxOut(nValue=11 * COIN, scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE))
156156

157157
with node.assert_debug_log(['mapOrphan overflow, removed 1 tx']):
158-
node.p2p.send_txs_and_test(orphan_tx_pool, node, success=False)
158+
node.p2ps[0].send_txs_and_test(orphan_tx_pool, node, success=False)
159159

160160
rejected_parent = CTransaction()
161161
rejected_parent.vin.append(CTxIn(outpoint=COutPoint(tx_orphan_2_invalid.sha256, 0)))
162162
rejected_parent.vout.append(CTxOut(nValue=11 * COIN, scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE))
163163
rejected_parent.rehash()
164164
with node.assert_debug_log(['not keeping orphan with rejected parents {}'.format(rejected_parent.hash)]):
165-
node.p2p.send_txs_and_test([rejected_parent], node, success=False)
165+
node.p2ps[0].send_txs_and_test([rejected_parent], node, success=False)
166166

167167

168168
if __name__ == '__main__':

0 commit comments

Comments
 (0)