62 std::vector<CBlockIndex> blocks(3000 + 2 * 24 * 3600);
68 double dMaxErr = 0.0001166792656486;
72 blocks[0].nHeight = 0;
73 blocks[0].nTime = 1269211443;
76 blocks[0].nBits = 0x0dedbeef;
109 blocks[i] =
GetBlockIndex(&blocks[i - 1], 600 - 172800, nBits);
121 blocks[i] =
GetBlockIndex(&blocks[i - 1], 600 + 172800, nBits);
130 for (; i < 150; i++) {
141 for (
size_t j = 0;
j < 10; i++,
j++) {
194 blocks[i] =
GetBlockIndex(&blocks[i - 1], 600 + 2 * 24 * 3600, nBits);
207 blocks[i] =
GetBlockIndex(&blocks[i - 1], 600 - 2 * 24 * 3600, nBits);
211 &blocks[i - 1], nBits, &blocks[1])) <
dMaxErr);
218 blocks[i] =
GetBlockIndex(&blocks[i - 1], 600 - 2 * 24 * 3600, nBits);
234 blocks[i] =
GetBlockIndex(&blocks[i - 1], 600 + 2 * 24 * 3600, nBits);
244 blocks[i] =
GetBlockIndex(&blocks[i - 1], 600 + 2 * 24 * 3600, nBits);
275 blocks[i] =
GetBlockIndex(&blocks[i - 1], -2 * 24 * 3600 - 30, nBits);
276 for (
size_t j = 0;
j < 4 * 24 * 3600 + 660;
j++) {
310 "solveTime: %d\tStep size: %.8f%%\tdErr: %.8f%%\tnBits: %0x\n",
311 int64_t(blocks[i].nTime) - blocks[i - 1].nTime,
dStep * 100,
315 strprintf(
"solveTime: %d\tStep size: %.8f%%\tdRelErr: "
316 "%.8f%%\tnBits: %0x\n",
317 int64_t(blocks[i].nTime) - blocks[i - 1].nTime,
321 "Min error: %16.14f%%\tMax error: %16.14f%%\tMax step: %16.14f%%\n",
325 dMax > 0.0001166792656485 &&
dMax < 0.0001166792656486,
335 for (
size_t j = 0;
j < 100; i++,
j++) {
428 for (
size_t k = 0; k < 3; k++) {
461 2 * (256 - 33) * 144, powLimit,
nHalfLife);
479 "00000000ffb1ffffffffffffffffffffffffffffffffffffffffffffffffffff"};
481 "000000008000000000000000000fffffffffffffffffffffffffffffffffffff"};
491 {powLimit, 600, 0, 2 * 144, powLimit >> 1, 0x1c7fffff},
492 {powLimit, 600, 0, 4 * 144, powLimit >> 2, 0x1c3fffff},
493 {powLimit >> 1, 600, 0, 2 * 144, powLimit >> 2, 0x1c3fffff},
494 {powLimit >> 2, 600, 0, 2 * 144, powLimit >> 3, 0x1c1fffff},
495 {powLimit >> 3, 600, 0, 2 * 144, powLimit >> 4, 0x1c0fffff},
496 {powLimit, 600, 0, 2 * (256 - 34) * 144, 3, 0x01030000},
497 {powLimit, 600, 0, 2 * (256 - 34) * 144 + 119, 3, 0x01030000},
498 {powLimit, 600, 0, 2 * (256 - 34) * 144 + 120, 2, 0x01020000},
499 {powLimit, 600, 0, 2 * (256 - 33) * 144 - 1, 2, 0x01020000},
501 {powLimit, 600, 0, 2 * (256 - 33) * 144, 1, 0x01010000},
503 {powLimit, 600, 0, 2 * (256 - 32) * 144, 1, 0x01010000},
504 {1, 600, 0, 2 * (256 - 32) * 144, 1, 0x01010000},
505 {powLimit, 600, 2 * (512 - 32) * 144, 0, powLimit,
powLimit_nBits},
515 {1, 600, 600 * 2 * 224 * 144 - 1, 0,
arith_uint256(0xffff8) << 204,
527 v.expectedTarget, v.expectednBits) +
528 strprintf(
"nextTarget= %s\nnext nBits= 0x%08x\n",
arith_uint256 CalculateASERT(const arith_uint256 &refTarget, const int64_t nPowTargetSpacing, const int64_t nTimeDiff, const int64_t nHeightDiff, const arith_uint256 &powLimit, const int64_t nHalfLife) noexcept