Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_scantxoutset.py
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.log.info("Stop node, remove wallet, mine again some blocks...") | self.log.info("Stop node, remove wallet, mine again some blocks...") | ||||
self.stop_node(0) | self.stop_node(0) | ||||
shutil.rmtree(os.path.join( | shutil.rmtree(os.path.join( | ||||
self.nodes[0].datadir, "regtest", 'wallets')) | self.nodes[0].datadir, "regtest", 'wallets')) | ||||
self.start_node(0) | self.start_node(0) | ||||
self.nodes[0].generate(110) | self.nodes[0].generate(110) | ||||
scan = self.nodes[0].scantxoutset("start", []) | |||||
info = self.nodes[0].gettxoutsetinfo() | |||||
assert_equal(scan['success'], True) | |||||
assert_equal(scan['height'], info['height']) | |||||
assert_equal(scan['txouts'], info['txouts']) | |||||
assert_equal(scan['bestblock'], info['bestblock']) | |||||
self.restart_node(0, ['-nowallet']) | self.restart_node(0, ['-nowallet']) | ||||
self.log.info("Test if we have found the non HD unspent outputs.") | self.log.info("Test if we have found the non HD unspent outputs.") | ||||
assert_equal(self.nodes[0].scantxoutset( | assert_equal(self.nodes[0].scantxoutset( | ||||
"start", ["pkh(" + pubkey + ")"])['total_amount'], Decimal("0.002")) | "start", ["pkh(" + pubkey + ")"])['total_amount'], Decimal("0.002")) | ||||
assert_equal(self.nodes[0].scantxoutset( | assert_equal(self.nodes[0].scantxoutset( | ||||
"start", ["combo(" + pubkey + ")"])['total_amount'], Decimal("0.002")) | "start", ["combo(" + pubkey + ")"])['total_amount'], Decimal("0.002")) | ||||
assert_equal(self.nodes[0].scantxoutset( | assert_equal(self.nodes[0].scantxoutset( | ||||
"start", ["addr(" + addr + ")"])['total_amount'], Decimal("0.002")) | "start", ["addr(" + addr + ")"])['total_amount'], Decimal("0.002")) | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |