Page MenuHomePhabricator

[backport#20016] uint256: 1 is a constant
ClosedPublic

Authored by majcosta on May 5 2021, 14:49.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC1377a4f39fc1: [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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable