[#ChainstateManager-AcceptBlock] = xref:ChainstateManager.adoc[ChainstateManager]::AcceptBlock :relfileprefix: ../ :mrdocs: Sufficiently validate a block for disk storage (and store on disk). == Synopsis Declared in `<validation.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[requires_capability(0x7f2e1bc17a28), requires_capability(0x7f2e146b5d78), requires_capability(0x7f2e298fb148), requires_capability(0x7f2e360b88a8)]] bool AcceptBlock( std::shared_ptr<CBlock const> const& pblock, xref:BlockValidationState.adoc[BlockValidationState]& state, xref:CBlockIndex.adoc[CBlockIndex]** ppindex, bool fRequested, xref:FlatFilePos.adoc[FlatFilePos] const* dbp, bool* fNewBlock, bool min_pow_checked); ---- == Return Value False if the block or header is invalid, or if saving to disk fails (likely a fatal error); true otherwise. == Parameters [cols="1,4"] |=== | Name| Description | *pblock* [in] | The block we want to process. | *fRequested* [in] | Whether we requested this block from a peer. | *dbp* [in] | The location on disk, if we are importing this block from prior storage. | *min_pow_checked* [in] | True if proof‐of‐work anti‐DoS checks have been done by caller for headers chain | *state* [out] | The state of the block validation. | *ppindex* [out] | Optional return parameter to get the CBlockIndex pointer for this block. | *fNewBlock* [out] | Optional return parameter to indicate if the block is new to our storage. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#