aboutsummaryrefslogtreecommitdiff
path: root/src/uint256.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2020-09-28 09:16:47 +0200
committerMarcoFalke <[email protected]>2020-09-28 09:16:56 +0200
commitc95784e3d31dc557b175181bc034339df22cb5fd (patch)
tree957b097c6396295735753e02693444de8fb90f51 /src/uint256.cpp
parentMerge #20026: test: typo in a functional test doc (diff)
parentwallet: no need for duplicate storage for ABANDON_HASH constant (diff)
downloaddiscoin-c95784e3d31dc557b175181bc034339df22cb5fd.tar.xz
discoin-c95784e3d31dc557b175181bc034339df22cb5fd.zip
Merge #20016: uint256: 1 is a constant
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. ACKs for top commit: promag: ACK 4cc7171c9887e88027642927c979e507d7b78dda MarcoFalke: re ACK 4cc7171c98, only change is some constexpr shuffling 🛁 kallewoof: ACK 4cc7171c9887e88027642927c979e507d7b78dda Tree-SHA512: 7f399658bfd9ffa4075bc2349049476d842b9579a67518fb7151f56eab36907ef24b1474ee1e89bdc69fe181abe7295dfe19e33b3623d43cec71fc00e356e347
Diffstat (limited to 'src/uint256.cpp')
-rw-r--r--src/uint256.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/uint256.cpp b/src/uint256.cpp
index ee1b34ead..d074df2f2 100644
--- a/src/uint256.cpp
+++ b/src/uint256.cpp
@@ -80,7 +80,4 @@ template std::string base_blob<256>::ToString() const;
template void base_blob<256>::SetHex(const char*);
template void base_blob<256>::SetHex(const std::string&);
-uint256& UINT256_ONE() {
- static uint256* one = new uint256(uint256S("0000000000000000000000000000000000000000000000000000000000000001"));
- return *one;
-}
+const uint256 uint256::ONE(1);