[#btck_block_check] = btck_block_check :mrdocs: Perform context‐free validation checks on a btck_Block. == Synopsis Declared in `<kernel/bitcoinkernel.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[__nonnull__]] int btck_block_check( xref:btck_Block-04.adoc[btck_Block] const* block, xref:btck_ConsensusParams-08.adoc[btck_ConsensusParams] const* consensus_params, xref:btck_BlockCheckFlags.adoc[btck_BlockCheckFlags] flags, xref:btck_BlockValidationState-0e.adoc[btck_BlockValidationState]* validation_state); ---- == Description Runs the base context‐free block checks (size limits, coinbase structure, transaction checks, and sigop limits) using the supplied btck_ConsensusParams. The proof‐of‐work and merkle‐root checks are optional and can be toggled via `flags.` Note that this does not include any transaction script, timestamps, order, or other checks that may require more context. == Return Value 1 if the btck_Block passed the checks, 0 otherwise. == Parameters [cols="1,4"] |=== | Name| Description | *block* [in] | Non‐null, btck_Block to validate. | *consensus_params* [in] | Non‐null, btck_ConsensusParams for validation. | *flags* [in] | Bitmask of btck_BlockCheckFlags controlling the optional POW and merkle‐root checks. Use btck_BlockCheckFlags_BASE to run only the base checks. | *validation_state* [out] | Non‐null, previously created with btck_block_validation_state_create. Overwritten in‐place with the validation result. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#