HomePhabricator

[backport#14518] rpc: Always throw in getblockstats if -txindex is required

Description

[backport#14518] rpc: Always throw in getblockstats if -txindex is required

Summary:
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.

https://github.com/bitcoin/bitcoin/pull/14518/commits/3be209d103297aaf2fe4711e237a65046488ea19

Backport of Core PR14518

Test Plan:

ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6287

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Oct 26 2018, 11:21
majcostaCommitted on May 29 2020, 14:22
majcostaPushed on May 29 2020, 14:22
Reviewer
Restricted Project
Differential Revision
D6287: [backport#14518] rpc: Always throw in getblockstats if -txindex is required
Parents
rABC02766ca19f53: [backport#15458] refactor: Drop redundant wallet reference
Branches
Unknown
Tags
Unknown