HomePhabricator

[avalanche] Extract the vote status in an enum class

Description

[avalanche] Extract the vote status in an enum class

Summary:
This moves the Status enum out of the BlockUpdate class. This makes it possible to use the same status values for conflicting proofs. Another diff will extract an API from BlockUpdate to make it possilble to build a ProofUpdate class sharing the same interface.

VoteStatus is an enum class and cannot have an operator<<() method, so we need to update the tests to use BOOST_CHECK instead of BOOST_CHECK_EQUAL. Apart from this there is no change in behavior.

Ref T1854.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Maniphest Tasks: T1854

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

Details

Provenance
FabienAuthored on Oct 4 2021, 12:56
FabienPushed on Oct 4 2021, 13:52
Reviewer
Restricted Project
Differential Revision
D10249: [avalanche] Extract the vote status in an enum class
Parents
rABC461b116e804f: [avalanche] Move the vote eror codes to its own enum class
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task