aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorHodlinator <172445034+hodlinator@users.noreply.github.com>2024-08-01 23:33:24 +0200
committerHodlinator <172445034+hodlinator@users.noreply.github.com>2024-08-05 14:45:18 +0200
commitb74d8d58fa4e620e24c30a1786e968604423a028 (patch)
tree4c5a1e6a0acc7ca98dd57d4451dab25890937b61 /contrib
parent1afa3c84fcdcad3b54ec13f29d7957ec1c2b01d0 (diff)
refactor: Add consteval uint256(hex_str)
Complements uint256::FromHex() nicely in that it naturally does all error checking at compile time and so doesn't need to return an std::optional. Will be used in the following 2 commits to replace many calls to uint256S(). uint256S() calls taking C-string literals are littered throughout the codebase and executed at runtime to perform parsing unless a given optimizer was surprisingly efficient. While this may not be a hot spot, it's better hygiene in C++20 to store the parsed data blob directly in the binary, without any parsing at runtime.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions