Skip to content

Commit 54b8c58

Browse files
conscottjnewbery
authored andcommitted
[test] Fix nits leftover from 11771
Remove unused variable reassignments in p2p_invalid_tx.py and call send_txs_and_test() with valid transaction.
1 parent f4f4f51 commit 54b8c58

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/functional/p2p_invalid_tx.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ def run_test(self):
3333
self.log.info("Create a new block with an anyone-can-spend coinbase.")
3434
height = 1
3535
block = create_block(tip, create_coinbase(height), block_time)
36-
block_time += 1
3736
block.solve()
3837
# Save the coinbase for later
3938
block1 = block
4039
tip = block.sha256
41-
height += 1
4240
node.p2p.send_blocks_and_test([block], node, success=True)
4341

4442
self.log.info("Mature the block.")
@@ -49,7 +47,10 @@ def run_test(self):
4947
tx1 = create_transaction(block1.vtx[0], 0, b'\x64', 50 * COIN - 12000)
5048
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)')
5149

52-
# TODO: test further transactions...
50+
# Verify valid transaction
51+
tx1 = create_transaction(block1.vtx[0], 0, b'', 50 * COIN - 12000)
52+
node.p2p.send_txs_and_test([tx1], node, success=True)
53+
5354

5455
if __name__ == '__main__':
5556
InvalidTxRequestTest().main()

0 commit comments

Comments
 (0)