Changeset View
Changeset View
Standalone View
Standalone View
src/test/blockcheck_tests.cpp
Show All 30 Lines | static void RunCheckOnBlock(const GlobalConfig &config, const CBlock &block) { | ||||
RunCheckOnBlockImpl(config, block, state, true); | RunCheckOnBlockImpl(config, block, state, true); | ||||
} | } | ||||
static void RunCheckOnBlock(const GlobalConfig &config, const CBlock &block, | static void RunCheckOnBlock(const GlobalConfig &config, const CBlock &block, | ||||
const std::string &reason) { | const std::string &reason) { | ||||
BlockValidationState state; | BlockValidationState state; | ||||
RunCheckOnBlockImpl(config, block, state, false); | RunCheckOnBlockImpl(config, block, state, false); | ||||
BOOST_CHECK_EQUAL(state.GetRejectCode(), REJECT_INVALID); | |||||
BOOST_CHECK_EQUAL(state.GetRejectReason(), reason); | BOOST_CHECK_EQUAL(state.GetRejectReason(), reason); | ||||
} | } | ||||
static COutPoint InsecureRandOutPoint() { | static COutPoint InsecureRandOutPoint() { | ||||
return COutPoint(TxId(InsecureRand256()), 0); | return COutPoint(TxId(InsecureRand256()), 0); | ||||
} | } | ||||
BOOST_AUTO_TEST_CASE(blockfail) { | BOOST_AUTO_TEST_CASE(blockfail) { | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |