HomePhabricator

[backport#20016] uint256: 1 is a constant

Description

[backport#20016] uint256: 1 is a constant

Summary:
4cc7171c9887e88027642927c979e507d7b78dda wallet: no need for duplicate storage for ABANDON_HASH constant (Anthony Towns)
82cf4641f4a161834d07ce83c18982d9b143c040 scripted-diff: Replace UINT256_ONE() with uint256::ONE (Anthony Towns)
183f308fff4caad3e3ada654b6fdf597d262c4c1 uint256: Update constructors to c++11, make ONE static (Anthony Towns)

Pull request description:

`UINT256_ONE()` returns a reference to a global; mark it as const to be sure someone doesn't accidently modify it.

Backport of core#20016

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Sep 28 2020, 07:16
majcostaCommitted on May 5 2021, 17:01
majcostaPushed on May 5 2021, 17:01
Reviewer
Restricted Project
Differential Revision
D9477: [backport#20016] uint256: 1 is a constant
Parents
rABC58ab732c853a: [avalanche] add an OrphanProofPool class
Branches
Unknown
Tags
Unknown