MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / TestConditionChecker

Class TestConditionChecker

src/test/versionbits_tests.cpp:20–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18static const Consensus::Params paramsDummy = Consensus::Params();
19
20class TestConditionChecker : public AbstractThresholdConditionChecker
21{
22private:
23 mutable ThresholdConditionCache cache;
24
25public:
26 int64_t BeginTime(const Consensus::Params& params) const { return TestTime(10000); }
27 int64_t EndTime(const Consensus::Params& params) const { return TestTime(20000); }
28 int Period(const Consensus::Params& params) const { return 1000; }
29 int Threshold(const Consensus::Params& params) const { return 900; }
30 bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const { return (pindex->nVersion & 0x100); }
31
32 ThresholdState GetStateFor(const CBlockIndex* pindexPrev) const { return AbstractThresholdConditionChecker::GetStateFor(pindexPrev, paramsDummy, cache); }
33};
34
35#define CHECKERS 6
36

Callers 1

VersionBitsTesterClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected