aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_getblockstats.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-10-26 13:21:11 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-10-26 13:21:17 +0200
commit9d4541508b981eb7f05c0b9f1d94a698e4aab1d2 (patch)
treefe9fb095fe963524c04f5ab4c726566171ee3de8 /test/functional/rpc_getblockstats.py
parent754a00d55f30f6112a1b68cb0bec5d59565096d1 (diff)
parent3be209d103297aaf2fe4711e237a65046488ea19 (diff)
Merge #14518: rpc: Always throw in getblockstats if -txindex is required
3be209d103297aaf2fe4711e237a65046488ea19 rpc: Always throw in getblockstats if -txindex is required (João Barbosa) Pull request description: 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. Fixes #14499. Tree-SHA512: d3a6402889e3ce7199632e79eba66d7d471ff7de5c564d35312e2340cc6d84ef544a8172548fbc2eedf5e637b56dc57bbf7a9815ab798c7f226755f897fd8f3e
Diffstat (limited to 'test/functional/rpc_getblockstats.py')
-rwxr-xr-xtest/functional/rpc_getblockstats.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/rpc_getblockstats.py b/test/functional/rpc_getblockstats.py
index b24bed6adf..ca9e24367a 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