Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.cpp
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | public: | ||||
CBlockLocator getTipLocator() override { | CBlockLocator getTipLocator() override { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
return ::ChainActive().GetLocator(); | return ::ChainActive().GetLocator(); | ||||
} | } | ||||
bool contextualCheckTransactionForCurrentBlock( | bool contextualCheckTransactionForCurrentBlock( | ||||
const CTransaction &tx, TxValidationState &state) override { | const CTransaction &tx, TxValidationState &state) override { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
return ContextualCheckTransactionForCurrentBlock( | return ContextualCheckTransactionForCurrentBlock( | ||||
m_params.GetConsensus(), tx, state); | ::ChainActive().Tip(), m_params.GetConsensus(), tx, state); | ||||
} | } | ||||
std::optional<int> | std::optional<int> | ||||
findLocatorFork(const CBlockLocator &locator) override { | findLocatorFork(const CBlockLocator &locator) override { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
if (CBlockIndex *fork = g_chainman.m_blockman.FindForkInGlobalIndex( | if (CBlockIndex *fork = g_chainman.m_blockman.FindForkInGlobalIndex( | ||||
::ChainActive(), locator)) { | ::ChainActive(), locator)) { | ||||
return fork->nHeight; | return fork->nHeight; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines |