11 #include <boost/test/unit_test.hpp>
21 "\x9c\x52\x4a\xdb\xcf\x56\x11\x12\x2b\x29\x12\x5e\x5d\x35\xd2\xd2"
22 "\x22\x81\xaa\xb5\x33\xf0\x08\x32\xd5\x56\xb1\xf9\xea\xe5\x1d\x7d";
23 const
char R1ArrayHex[] = "7D1DE5EAF9B156D53208F033B5AA8122D2d2355d5e12292b121156cfdb4a529c";
28 "\x70\x32\x1d\x7c\x47\xa5\x6b\x40\x26\x7e\x0a\xc3\xa6\x9c\xb6\xbf"
29 "\x13\x30\x47\xa3\x19\x2d\xda\x71\x49\x13\x72\xf0\xb4\xca\x81\xd7";
34 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
35 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
40 "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
41 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
46 "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"
47 "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
53 std::stringstream Stream;
55 for (
unsigned int i = 0; i < width; ++i)
57 Stream<<std::setw(2)<<std::setfill(
'0')<<(
unsigned int)A[width-i-1];
130 for (
int i = 255; i >= 0; --i) {
132 *(TmpL.
begin() + (i>>3)) |= 1<<(7-(i&7));
145 for (
int i = 159; i >= 0; --i) {
147 *(TmpS.
begin() + (i>>3)) |= 1<<(7-(i&7));
284 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
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, int nVersion=0)
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[]
static const int PROTOCOL_VERSION
network protocol versioning