HomePhabricator

[avalanche] Fix wrong init of the chain work in tests

Description

[avalanche] Fix wrong init of the chain work in tests

Summary: Does a bug that is never reached actually is a bug ? The processor tests checks ordering of the block indexes by chain work, and the initial value is initialized as arith_uint256(-1). But the arith_uint256 constructor has a variant that takes an uint64_t as an imput, so only the last 64 bits are set to 1 instead of the whole 256 bits as expected. However the chainwork on regtest is low enough that it doesn't matter, depite the code being wrong.

Test Plan:

ninja check-avalanche-processor_tests

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Sep 14 2023, 13:01
FabienPushed on Sep 14 2023, 16:05
Reviewer
Restricted Project
Differential Revision
D14486: [avalanche] Fix wrong init of the chain work in tests
Parents
rABC5a16883924de: [electrum] update the release procedure regarding the version tag
Branches
Unknown
Tags
Unknown