Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_send.py
Show First 20 Lines • Show All 382 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
assert_equal(self.nodes[0].gettransaction(txid)["confirmations"], 0) | assert_equal(self.nodes[0].gettransaction(txid)["confirmations"], 0) | ||||
# The mempool should allow it now: | # The mempool should allow it now: | ||||
res = self.nodes[0].testmempoolaccept([hex]) | res = self.nodes[0].testmempoolaccept([hex]) | ||||
assert res[0]["allowed"] | assert res[0]["allowed"] | ||||
# Don't wait for wallet to add it to the mempool: | # Don't wait for wallet to add it to the mempool: | ||||
res = self.nodes[0].sendrawtransaction(hex) | res = self.nodes[0].sendrawtransaction(hex) | ||||
self.nodes[0].generate(1) | self.nodes[0].generate(1) | ||||
assert_equal(self.nodes[0].gettransaction(txid)["confirmations"], 1) | assert_equal(self.nodes[0].gettransaction(txid)["confirmations"], 1) | ||||
self.sync_all() | |||||
self.log.info("Lock unspents...") | self.log.info("Lock unspents...") | ||||
utxo1 = w0.listunspent()[0] | utxo1 = w0.listunspent()[0] | ||||
assert_greater_than(utxo1["amount"], 1) | assert_greater_than(utxo1["amount"], 1) | ||||
res = self.test_send( | res = self.test_send( | ||||
from_wallet=w0, | from_wallet=w0, | ||||
to_wallet=w1, | to_wallet=w1, | ||||
amount=1_000_000, | amount=1_000_000, | ||||
Show All 25 Lines |