Bitcoin Core  22.99.0
P2P Digital Currency
Classes | Macros | Functions | Variables
versionbits_tests.cpp File Reference
#include <chain.h>
#include <chainparams.h>
#include <consensus/params.h>
#include <deploymentstatus.h>
#include <test/util/setup_common.h>
#include <validation.h>
#include <versionbits.h>
#include <boost/test/unit_test.hpp>
Include dependency graph for versionbits_tests.cpp:

Go to the source code of this file.

Classes

class  TestConditionChecker
 
class  TestDelayedActivationConditionChecker
 
class  TestAlwaysActiveConditionChecker
 
class  TestNeverActiveConditionChecker
 
class  VersionBitsTester
 

Macros

#define CHECKERS   6
 

Functions

static int32_t TestTime (int nHeight)
 
static const std::string StateName (ThresholdState state)
 
 BOOST_AUTO_TEST_CASE (versionbits_test)
 
static void check_computeblockversion (const Consensus::Params &params, Consensus::DeploymentPos dep)
 Check that ComputeBlockVersion will set the appropriate bit correctly. More...
 
 BOOST_AUTO_TEST_CASE (versionbits_computeblockversion)
 

Variables

static const Consensus::Params paramsDummy = Consensus::Params()
 

Macro Definition Documentation

◆ CHECKERS

#define CHECKERS   6

Definition at line 66 of file versionbits_tests.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( versionbits_computeblockversion  )

Definition at line 415 of file versionbits_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( versionbits_test  )

Definition at line 189 of file versionbits_tests.cpp.

Here is the call graph for this function:

◆ check_computeblockversion()

static void check_computeblockversion ( const Consensus::Params params,
Consensus::DeploymentPos  dep 
)
static

Check that ComputeBlockVersion will set the appropriate bit correctly.

Definition at line 260 of file versionbits_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StateName()

static const std::string StateName ( ThresholdState  state)
static

Definition at line 18 of file versionbits_tests.cpp.

Here is the caller graph for this function:

◆ TestTime()

static int32_t TestTime ( int  nHeight)
static

Definition at line 16 of file versionbits_tests.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ paramsDummy

const Consensus::Params paramsDummy = Consensus::Params()
static

Definition at line 30 of file versionbits_tests.cpp.