diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-12-15 10:05:51 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-05 15:14:47 +0100 |
commit | 5d3064bc44e0b608a428e230f384bd3f846dedca (patch) | |
tree | ac2c58dcc7e4d4a49b8a8c8871cd4c570a79c4b5 /src/arith_uint256.h | |
parent | a043facf5a8b75eb15547ed788296b6c3df2c586 (diff) |
Temporarily add SetNull/IsNull/GetCheapHash to base_uint
Also add a stub for arith_uint256 and its conversion functions,
for now completely based on uint256.
Eases step-by-step migration to blob.
Diffstat (limited to 'src/arith_uint256.h')
-rw-r--r-- | src/arith_uint256.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/arith_uint256.h b/src/arith_uint256.h new file mode 100644 index 0000000000..3bb384ca8a --- /dev/null +++ b/src/arith_uint256.h @@ -0,0 +1,19 @@ +#ifndef BITCOIN_ARITH_UINT256_H +#define BITCOIN_ARITH_UINT256_H + +// Temporary for migration to opaque uint160/256 +#include "uint256.h" + +class arith_uint256 : public uint256 { +public: + arith_uint256() {} + arith_uint256(const base_uint<256>& b) : uint256(b) {} + arith_uint256(uint64_t b) : uint256(b) {} + explicit arith_uint256(const std::string& str) : uint256(str) {} + explicit arith_uint256(const std::vector<unsigned char>& vch) : uint256(vch) {} +}; + +#define ArithToUint256(x) (x) +#define UintToArith256(x) (x) + +#endif // BITCOIN_UINT256_H |