Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 611 Lines • ▼ Show 20 Lines | |||||
bool IsUAHFenabled(const Config &config, const CBlockIndex *pindexPrev) { | bool IsUAHFenabled(const Config &config, const CBlockIndex *pindexPrev) { | ||||
if (pindexPrev == nullptr) { | if (pindexPrev == nullptr) { | ||||
return false; | return false; | ||||
} | } | ||||
return IsUAHFenabled(config, pindexPrev->nHeight); | return IsUAHFenabled(config, pindexPrev->nHeight); | ||||
} | } | ||||
static bool IsCashHFEnabled(const Config &config, int64_t nMedianTimePast) { | |||||
return nMedianTimePast >= | |||||
config.GetChainParams().GetConsensus().cashHardForkActivationTime; | |||||
} | |||||
bool IsCashHFEnabled(const Config &config, const CBlockIndex *pindexPrev) { | |||||
if (pindexPrev == nullptr) { | |||||
return false; | |||||
} | |||||
return IsCashHFEnabled(config, pindexPrev->GetMedianTimePast()); | |||||
} | |||||
// Used to avoid mempool polluting consensus critical paths if CCoinsViewMempool | // Used to avoid mempool polluting consensus critical paths if CCoinsViewMempool | ||||
// were somehow broken and returning the wrong scriptPubKeys | // were somehow broken and returning the wrong scriptPubKeys | ||||
static bool CheckInputsFromMempoolAndCache(const CTransaction &tx, | static bool CheckInputsFromMempoolAndCache(const CTransaction &tx, | ||||
CValidationState &state, | CValidationState &state, | ||||
const CCoinsViewCache &view, | const CCoinsViewCache &view, | ||||
CTxMemPool &pool, uint32_t flags, | CTxMemPool &pool, uint32_t flags, | ||||
bool cacheSigStore, | bool cacheSigStore, | ||||
PrecomputedTransactionData &txdata) { | PrecomputedTransactionData &txdata) { | ||||
▲ Show 20 Lines • Show All 4,414 Lines • Show Last 20 Lines |