diff --git a/test/functional/p2p_invalid_tx.py b/test/functional/p2p_invalid_tx.py --- a/test/functional/p2p_invalid_tx.py +++ b/test/functional/p2p_invalid_tx.py @@ -97,15 +97,16 @@ # * p2ps[0] will send valid orphan txs (one with low fee) # * p2ps[1] will send an invalid orphan tx (and is later disconnected for that) self.reconnect_p2p(num_connections=2) - + SCRIPT_PUB_KEY_OP_TRUE = b'\x51' self.log.info('Test orphan transaction handling ... ') # Create a root transaction that we withold until all dependend transactions # are sent out and in the orphan cache + tx_withhold = CTransaction() tx_withhold.vin.append( CTxIn(outpoint=COutPoint(block1.vtx[0].sha256, 0))) tx_withhold.vout.append( - CTxOut(nValue=50 * COIN - 12000, scriptPubKey=b'\x51')) + CTxOut(nValue=50 * COIN - 12000, scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE)) pad_tx(tx_withhold) tx_withhold.calc_sha256() @@ -116,7 +117,7 @@ tx_orphan_1.vout = [ CTxOut( nValue=10 * COIN, - scriptPubKey=b'\x51')] * 3 + scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE)] * 3 pad_tx(tx_orphan_1) tx_orphan_1.calc_sha256() @@ -125,7 +126,7 @@ tx_orphan_2_no_fee.vin.append( CTxIn(outpoint=COutPoint(tx_orphan_1.sha256, 0))) tx_orphan_2_no_fee.vout.append( - CTxOut(nValue=10 * COIN, scriptPubKey=b'\x51')) + CTxOut(nValue=10 * COIN, scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE)) pad_tx(tx_orphan_2_no_fee) # A valid transaction with sufficient fee @@ -133,7 +134,7 @@ tx_orphan_2_valid.vin.append( CTxIn(outpoint=COutPoint(tx_orphan_1.sha256, 1))) tx_orphan_2_valid.vout.append( - CTxOut(nValue=10 * COIN - 12000, scriptPubKey=b'\x51')) + CTxOut(nValue=10 * COIN - 12000, scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE)) tx_orphan_2_valid.calc_sha256() pad_tx(tx_orphan_2_valid) @@ -142,7 +143,7 @@ tx_orphan_2_invalid.vin.append( CTxIn(outpoint=COutPoint(tx_orphan_1.sha256, 2))) tx_orphan_2_invalid.vout.append( - CTxOut(nValue=11 * COIN, scriptPubKey=b'\x51')) + CTxOut(nValue=11 * COIN, scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE)) pad_tx(tx_orphan_2_invalid) tx_orphan_2_invalid.calc_sha256() @@ -189,7 +190,7 @@ orphan_tx_pool[i].vout.append( CTxOut( nValue=11 * COIN, - scriptPubKey=b'\x51')) + scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE)) pad_tx(orphan_tx_pool[i]) with node.assert_debug_log(['mapOrphan overflow, removed 1 tx']): @@ -204,7 +205,7 @@ rejected_parent.vout.append( CTxOut( nValue=11 * COIN, - scriptPubKey=b'\x51')) + scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE)) pad_tx(rejected_parent) rejected_parent.rehash() with node.assert_debug_log(['not keeping orphan with rejected parents {}'.format(rejected_parent.hash)]):