Submit a block and capture the validation state via the BlockChecked callback. Returns whether the block was accepted as a new valid block.
Declared in <node/miner.h>
bool
SubmitBlock(
ChainstateManager& chainman,
std::shared_ptr<CBlock const> const& block,
std::string& reason,
std::string& debug);
True if the block was accepted as a new valid block.
| 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. |