HomePhabricator

rpc: gettxoutsetinfo can be requested for specific blockheights

Description

rpc: gettxoutsetinfo can be requested for specific blockheights

Summary:
This is a backport of core#19521 [6 & 7/17]
https://github.com/bitcoin/bitcoin/pull/19521/commits/3f166ecc125fce6ccd995687fa16572090a5d099
https://github.com/bitcoin/bitcoin/pull/19521/commits/6a4c0c09ab4d073a26c3c4a02783d5dcd88f6eef (removal of 'disk_size' and 'transactions' from the index and test the RPC on specific heights)

Notes:

  • in the source commits there is a call to ::ChainstateActive().ForceFlushStateToDisk(); added, but it is removed in a following commit in the same PR. This is obviously duplicated with the active_chainstate.ForceFlushStateToDisk() a few lines later, so I omitted it.
  • I added a mention about disk_size not being available when using the index in the doc of the RPC call. This is added later in the same PR in an unrelated commit in the source material.
  • the new hash_or_height RPC parameter needs to be added to the CRPCConvertParamtable for the unit tests to pass. This is done in a later commit in the same PR in the source material

Depends on D11599

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Fabian Jahr <fjahr@protonmail.com>Authored on May 15 2020, 14:14
PiRKCommitted on Jun 13 2022, 18:27
PiRKPushed on Jun 13 2022, 18:27
Reviewer
Restricted Project
Differential Revision
D11600: rpc: gettxoutsetinfo can be requested for specific blockheights
Parents
rABCfab6ec9148cd: index: Coinstats index can be activated with command line flag
Branches
Unknown
Tags
Unknown