pub unsafe extern "C" fn btck_chainstate_manager_process_block(
chainstate_manager: *mut btck_ChainstateManager,
block: *const btck_Block,
new_block: *mut c_int,
) -> c_intExpand description
@brief Process and validate the passed in block with the chainstate
manager. Processing first does checks on the block, and if these passed,
saves it to disk. It then validates the block against the utxo set. If it is
valid, the chain is extended with it. The return value is not indicative of
the block’s validity. Detailed information on the validity of the block can
be retrieved by registering the block_checked callback in the validation
interface.
@param[in] chainstate_manager Non-null. @param[in] block Non-null, block to be validated.
@param[out] new_block Nullable, will be set to 1 if this block was not processed before. Note that this means it might also not be 1 if processing was attempted before, but the block was found invalid before its data was persisted. @return 0 if processing the block was successful. Will also return 0 for valid, but duplicate blocks.