libbitcoinkernel_sys

Function kernel_chainstate_manager_process_block

Source
pub unsafe extern "C" fn kernel_chainstate_manager_process_block(
    context: *const kernel_Context,
    chainstate_manager: *mut kernel_ChainstateManager,
    block: *mut kernel_Block,
    new_block: *mut bool,
) -> bool
Expand description

@brief Process and validate the passed in block with the chainstate manager. More detailed validation information in case of a failure can also be retrieved through a registered validation interface. If the block fails to validate the block_checked callback’s ‘BlockValidationState’ will contain details.

@param[in] context Non-null. @param[in] chainstate_manager Non-null. @param[in] block Non-null, block to be validated. @param[out] new_block Nullable, will be set to true if this block was not processed before, and false otherwise. @return True if processing the block was successful. Will also return true for valid, but duplicate blocks.