aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFabian Jahr <fjahr@protonmail.com>2020-06-02 23:55:32 +0200
committerFabian Jahr <fjahr@protonmail.com>2021-01-30 17:38:21 +0100
commit0d3b2f643d7da3202c0a0e757539208c4aa7c450 (patch)
tree513418d1567e6c1199b6a8c5a24f526ca22c5e97 /test
parent2474645f3b15687e7f196b89eb935d6e6a98a9da (diff)
rpc: Add hash_type MUHASH to gettxoutsetinfo
Also small style fix in rpc/util.cpp
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_blockchain.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py
index 99be6b7b8e..84ca1b99c2 100755
--- a/test/functional/rpc_blockchain.py
+++ b/test/functional/rpc_blockchain.py
@@ -268,6 +268,18 @@ class BlockchainTest(BitcoinTestFramework):
res5 = node.gettxoutsetinfo(hash_type='none')
assert 'hash_serialized_2' not in res5
+ # hash_type muhash should return a different UTXO set hash.
+ res6 = node.gettxoutsetinfo(hash_type='muhash')
+ assert 'muhash' in res6
+ assert(res['hash_serialized_2'] != res6['muhash'])
+
+ # muhash should not be included in gettxoutset unless requested.
+ for r in [res, res2, res3, res4, res5]:
+ assert 'muhash' not in r
+
+ # Unknown hash_type raises an error
+ assert_raises_rpc_error(-8, "foohash is not a valid hash_type", node.gettxoutsetinfo, "foohash")
+
def _test_getblockheader(self):
node = self.nodes[0]