Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_importprunedfunds.py
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
assert_raises_rpc_error( | assert_raises_rpc_error( | ||||
-5, "No addresses", self.nodes[1].importprunedfunds, rawtxn1, proof1) | -5, "No addresses", self.nodes[1].importprunedfunds, rawtxn1, proof1) | ||||
balance1 = self.nodes[1].getbalance() | balance1 = self.nodes[1].getbalance() | ||||
assert_equal(balance1, Decimal(0)) | assert_equal(balance1, Decimal(0)) | ||||
# Import with affiliated address with no rescan | # Import with affiliated address with no rescan | ||||
self.nodes[1].importaddress(address=address2, rescan=False) | self.nodes[1].importaddress(address=address2, rescan=False) | ||||
self.nodes[1].importprunedfunds(rawtxn2, proof2) | self.nodes[1].importprunedfunds( | ||||
rawtransaction=rawtxn2, txoutproof=proof2) | |||||
assert [tx for tx in self.nodes[1].listtransactions( | assert [tx for tx in self.nodes[1].listtransactions( | ||||
include_watchonly=True) if tx['txid'] == txnid2] | include_watchonly=True) if tx['txid'] == txnid2] | ||||
# Import with private key with no rescan | # Import with private key with no rescan | ||||
self.nodes[1].importprivkey(privkey=address3_privkey, rescan=False) | self.nodes[1].importprivkey(privkey=address3_privkey, rescan=False) | ||||
self.nodes[1].importprunedfunds(rawtxn3, proof3) | self.nodes[1].importprunedfunds(rawtxn3, proof3) | ||||
assert [tx for tx in self.nodes[1].listtransactions() if tx['txid'] | assert [tx for tx in self.nodes[1].listtransactions() if tx['txid'] | ||||
== txnid3] | == txnid3] | ||||
Show All 32 Lines |