aboutsummaryrefslogtreecommitdiff
path: root/src/arith_uint256.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-11-21 17:06:22 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-11-21 17:37:25 +0100
commitfacf629ce8ff1d1f6d254dde4e89b5018f8df60e (patch)
tree9d88a0243c941a79ea24f0660a0d6cab6a329ae4 /src/arith_uint256.cpp
parentd752349029ec7a76f1fd440db2ec2e458d0f3c99 (diff)
refactor: Remove unused and fragile string interface from arith_uint256
Diffstat (limited to 'src/arith_uint256.cpp')
-rw-r--r--src/arith_uint256.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp
index 3776cfb6de..0d5b3d5b0e 100644
--- a/src/arith_uint256.cpp
+++ b/src/arith_uint256.cpp
@@ -8,14 +8,7 @@
#include <uint256.h>
#include <crypto/common.h>
-
-template <unsigned int BITS>
-base_uint<BITS>::base_uint(const std::string& str)
-{
- static_assert(BITS/32 > 0 && BITS%32 == 0, "Template parameter BITS must be a positive multiple of 32.");
-
- SetHex(str);
-}
+#include <cassert>
template <unsigned int BITS>
base_uint<BITS>& base_uint<BITS>::operator<<=(unsigned int shift)
@@ -154,22 +147,6 @@ std::string base_uint<BITS>::GetHex() const
}
template <unsigned int BITS>
-void base_uint<BITS>::SetHex(const char* psz)
-{
- base_blob<BITS> b;
- b.SetHex(psz);
- for (int x = 0; x < this->WIDTH; ++x) {
- this->pn[x] = ReadLE32(b.begin() + x*4);
- }
-}
-
-template <unsigned int BITS>
-void base_uint<BITS>::SetHex(const std::string& str)
-{
- SetHex(str.c_str());
-}
-
-template <unsigned int BITS>
std::string base_uint<BITS>::ToString() const
{
return GetHex();