10 #include <boost/test/unit_test.hpp>
20 "\x9c\x52\x4a\xdb\xcf\x56\x11\x12\x2b\x29\x12\x5e\x5d\x35\xd2\xd2"
21 "\x22\x81\xaa\xb5\x33\xf0\x08\x32\xd5\x56\xb1\xf9\xea\xe5\x1d\x7d";
22 const
char R1ArrayHex[] = "7D1DE5EAF9B156D53208F033B5AA8122D2d2355d5e12292b121156cfdb4a529c";
27 "\x70\x32\x1d\x7c\x47\xa5\x6b\x40\x26\x7e\x0a\xc3\xa6\x9c\xb6\xbf"
28 "\x13\x30\x47\xa3\x19\x2d\xda\x71\x49\x13\x72\xf0\xb4\xca\x81\xd7";
33 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
34 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
39 "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
40 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
45 "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"
46 "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
52 std::stringstream Stream;
54 for (
unsigned int i = 0; i < width; ++i)
56 Stream<<std::setw(2)<<std::setfill(
'0')<<(
unsigned int)A[width-i-1];
129 for (
int i = 255; i >= 0; --i) {
131 *(TmpL.
begin() + (i>>3)) |= 1<<(7-(i&7));
144 for (
int i = 159; i >= 0; --i) {
146 *(TmpS.
begin() + (i>>3)) |= 1<<(7-(i&7));
284 std::string s_12{
"0000000000000000000000000000000000000000000000000000000000000012"};
311 uint256 one =
uint256S(
"0000000000000000000000000000000000000000000000000000000000000001");
arith_uint256 UintToArith256(const uint256 &a)
uint256 ArithToUint256(const arith_uint256 &a)
Double ended buffer combining vector and stream-like interfaces.
256-bit unsigned big integer.
constexpr unsigned char * end()
static constexpr unsigned int size()
void SetHex(const char *psz)
std::string ToString() const
constexpr unsigned char * begin()
std::string GetHex() const
static const uint256 ZERO
BOOST_AUTO_TEST_SUITE(cuckoocache_tests)
Test Suite for CuckooCache.
BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK(expr)
size_t GetSerializeSize(const T &t)
uint256 uint256S(const char *str)
uint160 uint160S(const char *str)
const unsigned char ZeroArray[]
const unsigned char R1Array[]
BOOST_AUTO_TEST_CASE(basics)
const unsigned char OneArray[]
const unsigned char R2Array[]
static std::string ArrayToString(const unsigned char A[], unsigned int width)
const unsigned char MaxArray[]