mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
refactor: define a UINT256_ONE global constant
Instead of having a uint256 representations of one scattered throughout where it is used, define it globally in uint256.h
This commit is contained in:
@@ -75,3 +75,8 @@ template std::string base_blob<256>::GetHex() const;
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user