HomePhabricator

validation: change UpdateTip for multiple chainstates

Description

validation: change UpdateTip for multiple chainstates

Summary:
Only perform certain behavior (namely that related to servicing
the getblocktemplate RPC call) for the active chainstate when
calling UpdateTip.

Co-authored-by: Jon Atack <jon@atack.com>

This is a backport of core#21526 [3/12]
https://github.com/bitcoin/bitcoin/pull/21526/commits/b217020df78bc981d221fe04497c831120ef969f
Depends on D12277

Notes:

  • the main difference from the source material is that we do not have the code handling BIP9 deployments in UpdateTip. As a result, there is no need for the warning_messages arguments in UpdateTipLog
  • the const qualifier for the CblockIndex *pindexNew argument in UpdateTip was missed in D1972

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
James O'Beirne <james.obeirne@gmail.com>Authored on Sep 16 2019, 20:32
PiRKCommitted on Oct 19 2022, 11:34
PiRKPushed on Oct 19 2022, 11:34
Reviewer
Restricted Project
Differential Revision
D12278: validation: change UpdateTip for multiple chainstates
Parents
rABC7db9e191cda0: validation: add chainman ref to CChainState
Branches
Unknown
Tags
Unknown