[test] Fix nits leftover from 11771
Remove unused variable reassignments in p2p_invalid_tx.py and call send_txs_and_test() with valid transaction.
This commit is contained in:
parent
f4f4f51f1a
commit
54b8c580b7
1 changed files with 4 additions and 3 deletions
|
@ -33,12 +33,10 @@ class InvalidTxRequestTest(BitcoinTestFramework):
|
|||
self.log.info("Create a new block with an anyone-can-spend coinbase.")
|
||||
height = 1
|
||||
block = create_block(tip, create_coinbase(height), block_time)
|
||||
block_time += 1
|
||||
block.solve()
|
||||
# Save the coinbase for later
|
||||
block1 = block
|
||||
tip = block.sha256
|
||||
height += 1
|
||||
node.p2p.send_blocks_and_test([block], node, success=True)
|
||||
|
||||
self.log.info("Mature the block.")
|
||||
|
@ -49,7 +47,10 @@ class InvalidTxRequestTest(BitcoinTestFramework):
|
|||
tx1 = create_transaction(block1.vtx[0], 0, b'\x64', 50 * COIN - 12000)
|
||||
node.p2p.send_txs_and_test([tx1], node, success=False, reject_code=16, reject_reason=b'mandatory-script-verify-flag-failed (Invalid OP_IF construction)')
|
||||
|
||||
# TODO: test further transactions...
|
||||
# Verify valid transaction
|
||||
tx1 = create_transaction(block1.vtx[0], 0, b'', 50 * COIN - 12000)
|
||||
node.p2p.send_txs_and_test([tx1], node, success=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
InvalidTxRequestTest().main()
|
||||
|
|
Loading…
Reference in a new issue