HomePhabricator

[backport#17162] chain: Remove CBlockIndex::SetNull helper

Description

[backport#17162] chain: Remove CBlockIndex::SetNull helper

Summary:
fa0467326ff004a0a20c6af9c8f6adcc74a0c8af chain: Set all CBlockIndex members to null, remove SetNull helper (MarcoFalke)

Pull request description:

The first commit removes the `SetNull` helper and inlines the member initialization (C++11). See https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#c-data-structures for rationale.

<strike>The second commit adds the `cs_main` lock annotation to `RaiseValidity`. See also #17161.</strike>

Backport of Core PR17162

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Oct 17 2019, 18:53
majcostaCommitted on Dec 24 2020, 16:26
majcostaPushed on Dec 24 2020, 16:26
Reviewer
Restricted Project
Differential Revision
D8752: [backport#17162] chain: Remove CBlockIndex::SetNull helper
Parents
rABCdc7db5ed938c: [backport#17328] GuessVerificationProgress: cap the ratio to 1
Branches
Unknown
Tags
Unknown