diff options
author | Andrew Chow <github@achow101.com> | 2023-10-05 14:05:57 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-10-05 14:19:34 -0400 |
commit | 0b2c93bc560cfb0f6cbf2151bb033d67f2648891 (patch) | |
tree | f8e0885de95dfee24570832c492fe06a04f8573d /src/compressor.h | |
parent | 6e5cf8e95391cd9a8bfc0c357e8a6f3963bad4b4 (diff) | |
parent | a9ef702a877a964bac724a56e2c0b5bee4ea7586 (diff) |
Merge bitcoin/bitcoin#28590: assumeutxo: change getchainstates RPC to return a list of chainstates
a9ef702a877a964bac724a56e2c0b5bee4ea7586 assumeutxo: change getchainstates RPC to return a list of chainstates (Ryan Ofsky)
Pull request description:
Current `getchainstates` RPC returns "normal" and "snapshot" fields which are not ideal because it requires new "normal" and "snapshot" terms to be defined, and the definitions are not really consistent with internal code. (In the RPC interface, the "snapshot" chainstate becomes the "normal" chainstate after it is validated, while in internal code there is no "normal chainstate" and the "snapshot chainstate" is still called that temporarily after it is validated).
The current `getchainstates` RPC is also awkward to use if you to want information about the most-work chainstate, because you have to look at the "snapshot" field if it exists, and otherwise fall back to the "normal" field.
Fix these issues by having `getchainstates` just return a flat list of chainstates ordered by work, and adding a new chainstate "validated" field alongside the existing "snapshot_blockhash" field so it is explicit if a chainstate was originally loaded from a snapshot, and whether the snapshot has been validated.
This change was motivated by comment thread in https://github.com/bitcoin/bitcoin/pull/28562#discussion_r1344154808
ACKs for top commit:
Sjors:
re-ACK a9ef702a877a964bac724a56e2c0b5bee4ea7586
jamesob:
re-ACK a9ef702
achow101:
ACK a9ef702a877a964bac724a56e2c0b5bee4ea7586
Tree-SHA512: b364e2e96675fb7beaaee60c4dff4b69e6bc2d8a30dea1ba094265633d1cddf9dbf1c5ce20c07d6e23222cf1e92a195acf6227e4901f3962e81a1e53a43490aa
Diffstat (limited to 'src/compressor.h')
0 files changed, 0 insertions, 0 deletions