rpc: various fixups for dumptxoutset

- Actually generate an assumeutxo hash and display it
- Add nchaintx to output (necessary for use in chainparams entry)
- Add path of serialized UTXO file to output
This commit is contained in:
James O'Beirne
2019-04-25 11:09:57 -04:00
committed by James O'Beirne
parent ab25ef8c7f
commit ffd09281fe
4 changed files with 35 additions and 6 deletions

View File

@@ -45,6 +45,10 @@ class DumptxoutsetTest(BitcoinTestFramework):
assert_equal(
digest, '7ae82c986fa5445678d2a21453bb1c86d39e47af13da137640c2b1cf8093691c')
assert_equal(
out['txoutset_hash'], 'd4b614f476b99a6e569973bf1c0120d88b1a168076f8ce25691fb41dd1cef149')
assert_equal(out['nchaintx'], 101)
# Specifying a path to an existing file will fail.
assert_raises_rpc_error(
-8, '{} already exists'.format(FILENAME), node.dumptxoutset, FILENAME)