aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-09-09 08:08:32 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-09-09 08:08:51 +0200
commit08bb4c31563505a30a9b7dd8e7ed98966d2c8494 (patch)
tree1c62b0968ccc0671c9d615454226ff009799b9a4 /test
parent91fcb9ff665117543297f66f3bb4027cbd267a14 (diff)
parentbdd6a4fd5da44c2575be9195ecb4213a13e74511 (diff)
downloadbitcoin-08bb4c31563505a30a9b7dd8e7ed98966d2c8494.tar.xz
Merge #16285: rpc: Improve scantxoutset response and help message
bdd6a4fd5da44c2575be9195ecb4213a13e74511 qa: Check scantxoutset result against gettxoutsetinfo (João Barbosa) fc0c410d6e19dd8e3abbc9b0fc13c836e6678750 rpc: Improve scantxoutset response and help message (João Barbosa) Pull request description: The new response keys `height` and `bestblock` allow the client to know at what point the scan took place. The help message now has all the response keys (`result` and `txouts` were missing) and it's improved a bit. Note that `searched_items` key is renamed to `txouts`, considering `scantxoutset` is marked experimental. ACKs for top commit: laanwj: ACK bdd6a4fd5da44c2575be9195ecb4213a13e74511 Tree-SHA512: 6bb7c3464b19857b756b8bc491ab7c58b0d948aad8c005b26ed27c55a1278f5639217e11a315bb505b4f44ebe86f413068c1e539c8a5f7a4007735586cc6443c
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_scantxoutset.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/rpc_scantxoutset.py b/test/functional/rpc_scantxoutset.py
index a1cd33ad54..9f94d11a93 100755
--- a/test/functional/rpc_scantxoutset.py
+++ b/test/functional/rpc_scantxoutset.py
@@ -58,6 +58,13 @@ class ScantxoutsetTest(BitcoinTestFramework):
self.start_node(0)
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.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"))