-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters