Skip to content

Commit 50c6c53

Browse files
committed
help debug invalid_tx
1 parent 05dc1c9 commit 50c6c53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/p2p_invalid_tx.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
assert_equal,
2020
wait_until,
2121
)
22+
from codecs import encode
2223

2324

2425
class InvalidTxRequestTest(BitcoinTestFramework):
@@ -79,10 +80,12 @@ def run_test(self):
7980
# Create a root transaction that we withhold until all dependend transactions
8081
# are sent out and in the orphan cache
8182
SCRIPT_PUB_KEY_OP_TRUE = b'\x51\x75' * 15 + b'\x51'
83+
self.log.info("SCRIPT_PUB_KEY_OP_TRUE: " + encode(SCRIPT_PUB_KEY_OP_TRUE, 'hex_codec').decode('ascii'))
8284
tx_withhold = CTransaction()
8385
tx_withhold.vin.append(CTxIn(outpoint=COutPoint(block1.vtx[0].sha256, 0)))
8486
tx_withhold.vout.append(CTxOut(nValue=50 * COIN - 12000, scriptPubKey=SCRIPT_PUB_KEY_OP_TRUE))
8587
tx_withhold.calc_sha256()
88+
self.log.info("tx_withhold.hash = "+tx_withhold.hash)
8689

8790
# Our first orphan tx with some outputs to create further orphan txs
8891
tx_orphan_1 = CTransaction()

0 commit comments

Comments
 (0)