aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFabian Jahr <fjahr@protonmail.com>2020-06-19 15:21:35 +0200
committerFabian Jahr <fjahr@protonmail.com>2020-06-22 01:55:41 +0200
commit40506bf93f955adfbc446c4d5fee4fa8bcfd7d9a (patch)
tree19cc59579551f4cf872a9708dac1795da55da3b3 /test
parentf17a4d1c4ddce6935a353004898fb4e8618a213e (diff)
test: Test gettxouttsetinfo hash_type option
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_blockchain.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py
index 6273c229ae..7c70f30ca3 100755
--- a/test/functional/rpc_blockchain.py
+++ b/test/functional/rpc_blockchain.py
@@ -241,6 +241,17 @@ class BlockchainTest(BitcoinTestFramework):
del res['disk_size'], res3['disk_size']
assert_equal(res, res3)
+ self.log.info("Test hash_type option for gettxoutsetinfo()")
+ # Adding hash_type 'hash_serialized_2', which is the default, should
+ # not change the result.
+ res4 = node.gettxoutsetinfo(hash_type='hash_serialized_2')
+ del res4['disk_size']
+ assert_equal(res, res4)
+
+ # hash_type none should not return a UTXO set hash.
+ res5 = node.gettxoutsetinfo(hash_type='none')
+ assert 'hash_serialized_2' not in res5
+
def _test_getblockheader(self):
node = self.nodes[0]