[#ChainstateManager-ProcessNewBlock] = xref:ChainstateManager.adoc[ChainstateManager]::ProcessNewBlock :relfileprefix: ../ :mrdocs: Process an incoming block. This only returns after the best known valid block is made active. Note that it does not, however, guarantee that the specific block passed to it has been checked for validity! == Synopsis Declared in `<validation.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[locks_excluded(0x7f2e1bc178e8), locks_excluded(0x7f2e146b5c38), locks_excluded(0x7f2e298fb008), locks_excluded(0x7f2e360b8768)]] bool ProcessNewBlock( std::shared_ptr<CBlock const> const& block, bool force_processing, bool min_pow_checked, bool* new_block); ---- == Description If you want to _possibly_ get feedback on whether block is valid, you must install a CValidationInterface (see validationinterface.h) ‐ this will have its BlockChecked method called whenever _any_ block completes validation. Note that we guarantee that either the proof‐of‐work is valid on block, or (and possibly also) BlockChecked will have been called. May not be called in a validationinterface callback. == Return Value If the block was processed, independently of block validity == Parameters [cols="1,4"] |=== | Name| Description | *block* [in] | The block we want to process. | *force_processing* [in] | Process this block even if unrequested; used for non‐network block sources. | *min_pow_checked* [in] | True if proof‐of‐work anti‐DoS checks have been done by caller for headers chain (note: only affects headers acceptance; if block header is already present in block index then this parameter has no effect) | *new_block* [out] | A boolean which is set to indicate if the block was first received via this call |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#