Changeset View
Changeset View
Standalone View
Standalone View
src/test/validation_block_tests.cpp
Show All 22 Lines | struct RegtestingSetup : public TestingSetup { | ||||
RegtestingSetup() : TestingSetup(CBaseChainParams::REGTEST) {} | RegtestingSetup() : TestingSetup(CBaseChainParams::REGTEST) {} | ||||
}; | }; | ||||
BOOST_FIXTURE_TEST_SUITE(validation_block_tests, RegtestingSetup) | BOOST_FIXTURE_TEST_SUITE(validation_block_tests, RegtestingSetup) | ||||
struct TestSubscriber : public CValidationInterface { | struct TestSubscriber : public CValidationInterface { | ||||
uint256 m_expected_tip; | uint256 m_expected_tip; | ||||
TestSubscriber(uint256 tip) : m_expected_tip(tip) {} | explicit TestSubscriber(uint256 tip) : m_expected_tip(tip) {} | ||||
void UpdatedBlockTip(const CBlockIndex *pindexNew, | void UpdatedBlockTip(const CBlockIndex *pindexNew, | ||||
const CBlockIndex *pindexFork, | const CBlockIndex *pindexFork, | ||||
bool fInitialDownload) override { | bool fInitialDownload) override { | ||||
BOOST_CHECK_EQUAL(m_expected_tip, pindexNew->GetBlockHash()); | BOOST_CHECK_EQUAL(m_expected_tip, pindexNew->GetBlockHash()); | ||||
} | } | ||||
void | void | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |