HomePhabricator

[avalanche] Add some safety to AvalancheBlockUpdate using static asserts

Description

[avalanche] Add some safety to AvalancheBlockUpdate using static asserts

Summary: AvalancheBlockUpdate rely on the two lowers bits of a CBlockIndex* to be zero to work properly. While we know this is true, enforcing this is the case using a static assert is preferable.

Test Plan:

make check

Reviewers: #bitcoin_abc, jasonbcox, Fabien

Reviewed By: #bitcoin_abc, jasonbcox, Fabien

Subscribers: Fabien, jasonbcox, teamcity, schancel

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

Details

Provenance
deadalnixAuthored on Dec 23 2018, 15:19
FabienPushed on Jan 6 2019, 12:04
Reviewer
Restricted Project
Differential Revision
D2222: [avalanche] Add some safety to AvalancheBlockUpdate using static asserts
Parents
rSTAGINGc52475a06949: Fix inverted logic in qt/bitcoin.cpp
Branches
Unknown
Tags
Unknown