Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_blockchain.py
Show First 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | def _test_gettxoutsetinfo(self): | ||||
res5 = node.gettxoutsetinfo(hash_type='none') | res5 = node.gettxoutsetinfo(hash_type='none') | ||||
assert 'hash_serialized' not in res5 | assert 'hash_serialized' not in res5 | ||||
# hash_type muhash should return a different UTXO set hash. | # hash_type muhash should return a different UTXO set hash. | ||||
res6 = node.gettxoutsetinfo(hash_type='muhash') | res6 = node.gettxoutsetinfo(hash_type='muhash') | ||||
assert 'muhash' in res6 | assert 'muhash' in res6 | ||||
assert(res['hash_serialized'] != res6['muhash']) | assert(res['hash_serialized'] != res6['muhash']) | ||||
# muhash should not be included in gettxoutset unless requested. | # muhash should not be returned unless requested. | ||||
for r in [res, res2, res3, res4, res5]: | for r in [res, res2, res3, res4, res5]: | ||||
assert 'muhash' not in r | assert 'muhash' not in r | ||||
# Unknown hash_type raises an error | # Unknown hash_type raises an error | ||||
assert_raises_rpc_error(-8, | assert_raises_rpc_error(-8, | ||||
"foohash is not a valid hash_type", | "foohash is not a valid hash_type", | ||||
node.gettxoutsetinfo, | node.gettxoutsetinfo, | ||||
"foohash") | "foohash") | ||||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |