Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | |||||
/** Dirty block index entries. */ | /** Dirty block index entries. */ | ||||
std::set<const CBlockIndex *> setDirtyBlockIndex; | std::set<const CBlockIndex *> setDirtyBlockIndex; | ||||
/** Dirty block file entries. */ | /** Dirty block file entries. */ | ||||
std::set<int> setDirtyFileInfo; | std::set<int> setDirtyFileInfo; | ||||
} // namespace | } // namespace | ||||
BlockValidationOptions::BlockValidationOptions(const Config &config) | BlockValidationOptions::BlockValidationOptions(const Config &config) | ||||
: checkPoW(true), checkMerkleRoot(true), | : excessiveBlockSize(config.GetMaxBlockSize()), checkPoW(true), | ||||
excessiveBlockSize(config.GetMaxBlockSize()) {} | checkMerkleRoot(true) {} | ||||
CBlockIndex *FindForkInGlobalIndex(const CChain &chain, | CBlockIndex *FindForkInGlobalIndex(const CChain &chain, | ||||
const CBlockLocator &locator) { | const CBlockLocator &locator) { | ||||
AssertLockHeld(cs_main); | AssertLockHeld(cs_main); | ||||
// Find the first block the caller has in the main chain | // Find the first block the caller has in the main chain | ||||
for (const uint256 &hash : locator.vHave) { | for (const uint256 &hash : locator.vHave) { | ||||
CBlockIndex *pindex = LookupBlockIndex(hash); | CBlockIndex *pindex = LookupBlockIndex(hash); | ||||
▲ Show 20 Lines • Show All 5,444 Lines • Show Last 20 Lines |