diff options
| author | João Barbosa <[email protected]> | 2018-10-19 15:24:08 +0100 |
|---|---|---|
| committer | João Barbosa <[email protected]> | 2018-10-19 15:28:41 +0100 |
| commit | 3be209d103297aaf2fe4711e237a65046488ea19 (patch) | |
| tree | 91ec33964e525d8a7b31fd474027ef3ec6b0d441 /test/functional/rpc_getblockstats.py | |
| parent | Merge #14465: tests: Stop node before removing the notification file (diff) | |
| download | discoin-3be209d103297aaf2fe4711e237a65046488ea19.tar.xz discoin-3be209d103297aaf2fe4711e237a65046488ea19.zip | |
rpc: Always throw in getblockstats if -txindex is required
Previously blocks with only the coinbase transaction didn't cause
the RPC error even if the requested stats required -txindex and
it wasn't enabled.
Diffstat (limited to 'test/functional/rpc_getblockstats.py')
| -rwxr-xr-x | test/functional/rpc_getblockstats.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/rpc_getblockstats.py b/test/functional/rpc_getblockstats.py index b24bed6ad..ca9e24367 100755 --- a/test/functional/rpc_getblockstats.py +++ b/test/functional/rpc_getblockstats.py @@ -170,6 +170,8 @@ class GetblockstatsTest(BitcoinTestFramework): self.nodes[0].getblockstats, hash_or_height=1, stats=['minfee' , 'aaa%s' % inv_sel_stat]) assert_raises_rpc_error(-8, 'One or more of the selected stats requires -txindex enabled', + self.nodes[1].getblockstats, hash_or_height=1) + assert_raises_rpc_error(-8, 'One or more of the selected stats requires -txindex enabled', self.nodes[1].getblockstats, hash_or_height=self.start_height + self.max_stat_pos) # Mainchain's genesis block shouldn't be found on regtest |