Skip to content

Commit 40506bf

Browse files
committed
test: Test gettxouttsetinfo hash_type option
1 parent f17a4d1 commit 40506bf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/functional/rpc_blockchain.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,17 @@ def _test_gettxoutsetinfo(self):
241241
del res['disk_size'], res3['disk_size']
242242
assert_equal(res, res3)
243243

244+
self.log.info("Test hash_type option for gettxoutsetinfo()")
245+
# Adding hash_type 'hash_serialized_2', which is the default, should
246+
# not change the result.
247+
res4 = node.gettxoutsetinfo(hash_type='hash_serialized_2')
248+
del res4['disk_size']
249+
assert_equal(res, res4)
250+
251+
# hash_type none should not return a UTXO set hash.
252+
res5 = node.gettxoutsetinfo(hash_type='none')
253+
assert 'hash_serialized_2' not in res5
254+
244255
def _test_getblockheader(self):
245256
node = self.nodes[0]
246257

0 commit comments

Comments
 (0)