HomePhabricator

[avalanche] Add some safety to AvalancheBlockUpdate using static asserts

Authored by deadalnix on Dec 23 2018, 15:19.

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

Committed
deadalnixJan 6 2019, 02:19
Pushed
deadalnixJan 6 2019, 02:19
Reviewer
Restricted Project
Differential Revision
D2222: [avalanche] Add some safety to AvalancheBlockUpdate using static asserts
Parents
rABCc52475a06949: Fix inverted logic in qt/bitcoin.cpp
Branches
Unknown
Tags
Unknown