[#node-SubmitBlock]
= xref:node.adoc[node]::SubmitBlock
:relfileprefix: ../
:mrdocs:

Submit a block and capture the validation state via the BlockChecked callback&period; Returns whether the block was accepted as a new valid block&period;

== Synopsis

Declared in `&lt;node&sol;miner&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
SubmitBlock(
    xref:ChainstateManager.adoc[ChainstateManager]& chainman,
    std::shared&lowbar;ptr&lt;CBlock const&gt; const& block,
    std::string& reason,
    std::string& debug);
----

== Return Value

True if the block was accepted as a new valid block&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *chainman*
| The chainstate manager to submit the block to&period;
| *block*
| The block to submit&period;
| *reason*
| Output set to a short rejection reason on failure&period;
| *debug*
| Output set to a detailed rejection message on failure&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
