#include <pow/aserti32d.h>
#include <chain.h>
#include <chainparams.h>
#include <config.h>
#include <consensus/activation.h>
#include <pow/pow.h>
#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp>
#include <cmath>
Go to the source code of this file.
|
static CBlockIndex | GetBlockIndex (CBlockIndex *pindexPrev, int64_t nTimeInterval, uint32_t nBits) |
|
static double | TargetFromBits (const uint32_t nBits) |
|
static double | GetASERTApproximationError (const CBlockIndex *pindexPrev, const uint32_t finalBits, const CBlockIndex *pindexAnchorBlock) |
|
| BOOST_AUTO_TEST_CASE (asert_difficulty_test) |
|
static std::string | StrPrintCalcArgs (const arith_uint256 refTarget, const int64_t targetSpacing, const int64_t timeDiff, const int64_t heightDiff, const arith_uint256 expectedTarget, const uint32_t expectednBits) |
|
| BOOST_AUTO_TEST_CASE (calculate_asert_test) |
|
| BOOST_AUTO_TEST_CASE (asert_activation_anchor_test) |
| Test transition of cw144 to ASERT algorithm, which involves the selection of an anchor block.
|
|
◆ BOOST_AUTO_TEST_CASE() [1/3]
Test transition of cw144 to ASERT algorithm, which involves the selection of an anchor block.
Now we'll try adding on blocks to activate ASERT. The activation block is going to be our anchor block. We will make several distinct anchor blocks.
Definition at line 551 of file aserti32d_tests.cpp.
◆ BOOST_AUTO_TEST_CASE() [2/3]
◆ BOOST_AUTO_TEST_CASE() [3/3]
◆ GetASERTApproximationError()
◆ GetBlockIndex()
◆ StrPrintCalcArgs()
◆ TargetFromBits()