Connect a run of blocks toward the most-work chain, one step of ActivateBestChain.
Declared in <validation.h>
[[requires_capability(0x7f9513ab5878, 0x7f9513ab58f0), requires_capability(0x7f9502c988e8, 0x7f9502c98960), requires_capability(0x7f952544a618, 0x7f952544a690), requires_capability(0x7f95174008f8, 0x7f9517400970)]]
bool
ActivateBestChainStep(
BlockValidationState& state,
CBlockIndex& index_most_work,
std::shared_ptr<CBlock const> const& pblock,
bool& fInvalidFound,
std::vector<ConnectedBlock>& connected_blocks);
true unless a system error occurred.
| Name | Description |
|---|---|
| state | Validation state updated with the reason for any failure. |
| index_most_work | Block index entry of the most-work candidate to build toward. |
| pblock | Optional already-loaded block to avoid re-reading it from disk. |
| fInvalidFound | Set to true if an invalid block was found during the step. |
| connected_blocks | Collects the blocks connected during this step. |