mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 03:01:09 +02:00
qa: Check scantxoutset result against gettxoutsetinfo
This commit is contained in:
@ -58,6 +58,13 @@ class ScantxoutsetTest(BitcoinTestFramework):
|
|||||||
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("start", [ "pkh(" + pubk1 + ")", "pkh(" + pubk2 + ")", "pkh(" + pubk3 + ")"])['total_amount'], Decimal("0.002"))
|
assert_equal(self.nodes[0].scantxoutset("start", [ "pkh(" + pubk1 + ")", "pkh(" + pubk2 + ")", "pkh(" + pubk3 + ")"])['total_amount'], Decimal("0.002"))
|
||||||
|
Reference in New Issue
Block a user