mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-18 16:42:54 +01:00
Merge bitcoin/bitcoin#31393: refactor: Move GuessVerificationProgress into ChainstateManager
facb4d010crefactor: Move GuessVerificationProgress into ChainstateManager (MarcoFalke) Pull request description: Currently the function is standalone, which means any passed-in data like `TxData` or the block pointer needs to be taken from the `ChainstateManager` and passed in. This is currently verbose and may become even more verbose if the function is reworked in the future. As the function can not be called without a `ChainstateManager` in production code anyway, make it a member function on the class. ACKs for top commit: ryanofsky: Code review ACKfacb4d010c. Nice cleanup, that should make this code less awkward to work with TheCharlatan: ACKfacb4d010cdanielabrozzoni: reACKfacb4d010cTree-SHA512: b17977e12cd7c6e308c47e6a1aa920acecd4442696e46d1f30bd7c201e9898ca2d581ff0bf2cc9f7334e146c1b0c50925adb849c8c17f65dcdf6877be1c5f776
This commit is contained in:
@@ -1827,7 +1827,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
if (tip_info) {
|
||||
tip_info->block_height = chain_active_height;
|
||||
tip_info->block_time = best_block_time;
|
||||
tip_info->verification_progress = GuessVerificationProgress(chainman.GetParams().TxData(), &tip);
|
||||
tip_info->verification_progress = chainman.GuessVerificationProgress(&tip);
|
||||
}
|
||||
if (tip_info && chainman.m_best_header) {
|
||||
tip_info->header_height = chainman.m_best_header->nHeight;
|
||||
|
||||
Reference in New Issue
Block a user