aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Scott <conor.r.scott.88@gmail.com>2018-02-13 16:54:38 -0500
committerJohn Newbery <john@johnnewbery.com>2018-02-13 19:03:47 -0500
commit54b8c580b74d2db7e1012506e6c08a35165bfa9f (patch)
tree7f7a6d644a8dec287b9ee30fc4bc34d227218178
parentf4f4f51f1a940a239c9b406fe3b362bf3303cbce (diff)
[test] Fix nits leftover from 11771
Remove unused variable reassignments in p2p_invalid_tx.py and call send_txs_and_test() with valid transaction.
-rwxr-xr-xtest/functional/p2p_invalid_tx.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/p2p_invalid_tx.py b/test/functional/p2p_invalid_tx.py
index 64fada38e2..69ce529ad6 100755
--- a/test/functional/p2p_invalid_tx.py
+++ b/test/functional/p2p_invalid_tx.py
@@ -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()