arith_uint256: remove initialization from byte vector

Remove initialization from vector (as this is only used in the tests).

Also implement SetHex and GetHex in terms of uint256, to avoid
duplicate code as well as avoid endianness issues (as they
work in term of bytes).
This commit is contained in:
Wladimir J. van der Laan
2014-12-19 13:07:07 +01:00
parent 30007fda76
commit 6bd0dc2a84
3 changed files with 21 additions and 55 deletions

View File

@@ -57,7 +57,6 @@ public:
}
explicit base_uint(const std::string& str);
explicit base_uint(const std::vector<unsigned char>& vch);
bool operator!() const
{
@@ -257,7 +256,6 @@ public:
arith_uint256(const base_uint<256>& b) : base_uint<256>(b) {}
arith_uint256(uint64_t b) : base_uint<256>(b) {}
explicit arith_uint256(const std::string& str) : base_uint<256>(str) {}
explicit arith_uint256(const std::vector<unsigned char>& vch) : base_uint<256>(vch) {}
/**
* The "compact" format is a representation of a whole