Page MenuHomePhabricator

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

Authored by majcosta on May 28 2020, 22:59.

Details

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

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.May 29 2020, 11:44