Skip to content

Commit f857f4c

Browse files
committed
Modify tests to check for instant respends
This should fail atm...
1 parent 4983f7a commit f857f4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/functional/p2p-instantsend.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ def test_block_doublespend(self):
7171
assert (res['hash'] != wrong_block)
7272
# wait for long time only for first node
7373
timeout = 1
74+
# send coins back to the controller node without waiting for confirmations
75+
receiver.sendtoaddress(self.nodes[0].getnewaddress(), 0.9, "", "", True)
76+
assert_equal(receiver.getwalletinfo()["balance"], 0)
7477
# mine more blocks
7578
# TODO: mine these blocks on an isolated node
7679
self.bump_mocktime(1)
@@ -109,6 +112,9 @@ def test_mempool_doublespend(self):
109112
for node in self.nodes:
110113
self.wait_for_instantlock(is_id, node)
111114
assert_raises_jsonrpc(-5, "No such mempool or blockchain transaction", isolated.getrawtransaction, dblspnd_txid)
115+
# send coins back to the controller node without waiting for confirmations
116+
receiver.sendtoaddress(self.nodes[0].getnewaddress(), 0.9, "", "", True)
117+
assert_equal(receiver.getwalletinfo()["balance"], 0)
112118

113119
if __name__ == '__main__':
114120
InstantSendTest().main()

0 commit comments

Comments
 (0)