Submit a block and capture the validation state via the BlockChecked callback. Returns whether the block was accepted as a new valid block.
Synopsis
Declared in <node/miner.h>
bool
SubmitBlock(
ChainstateManager& chainman,
std::shared_ptr<CBlock const> const& block,
std::string& reason,
std::string& debug);
Return Value
True if the block was accepted as a new valid block.
Parameters
Name |
Description |
chainman |
The chainstate manager to submit the block to. |
block |
The block to submit. |
reason |
Output set to a short rejection reason on failure. |
debug |
Output set to a detailed rejection message on failure. |
Created with MrDocs