Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 3,807 Lines • ▼ Show 20 Lines | bool ProcessNewBlockHeaders(const Config &config, | ||||
} | } | ||||
} | } | ||||
} | } | ||||
NotifyHeaderTip(); | NotifyHeaderTip(); | ||||
return true; | return true; | ||||
} | } | ||||
/** | /** | ||||
* Store block on disk. If dbp is non-null, the file is known to already reside | * Store a block on disk. | ||||
* on disk. | * | ||||
* @param[in] config The global config. | |||||
* @param[in-out] pblock The block we want to accept. | |||||
* @param[out] ppindex The last new block index, only set if the block | |||||
* was accepted. | |||||
* @param[in] fRequested A boolean to indicate if this block was requested | |||||
* from our peers. | |||||
* @param[in] dbp If non-null, the disk position of the block. | |||||
* @param[in-out] fNewBlock True if block was first received via this call. | |||||
* @return True if the block is accepted as a valid block and written to disk. | |||||
*/ | */ | ||||
static bool AcceptBlock(const Config &config, | static bool AcceptBlock(const Config &config, | ||||
const std::shared_ptr<const CBlock> &pblock, | const std::shared_ptr<const CBlock> &pblock, | ||||
CValidationState &state, CBlockIndex **ppindex, | CValidationState &state, CBlockIndex **ppindex, | ||||
bool fRequested, const CDiskBlockPos *dbp, | bool fRequested, const CDiskBlockPos *dbp, | ||||
bool *fNewBlock) { | bool *fNewBlock) { | ||||
AssertLockHeld(cs_main); | AssertLockHeld(cs_main); | ||||
▲ Show 20 Lines • Show All 1,623 Lines • Show Last 20 Lines |