[#TestBlockValidity] = TestBlockValidity :mrdocs: Verify a block, including transactions. == Synopsis Declared in `<validation.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[requires_capability(0x7f2e1b930980), requires_capability(0x7f2e275a9b60), requires_capability(0x7f2e3696af60), requires_capability(0x7f2e354571b0)]] xref:BlockValidationState.adoc[BlockValidationState] TestBlockValidity( xref:Chainstate.adoc[Chainstate]& chainstate, xref:CBlock.adoc[CBlock] const& block, bool check_pow, bool check_merkle_root); ---- == Description For signets the challenge verification is skipped when check_pow is false. == Return Value Valid or Invalid state. This doesn't currently return an Error state, and shouldn't unless there is something wrong with the existing chainstate. (This is different from functions like AcceptBlock which can fail trying to save new data.) == Parameters [cols="1,4"] |=== | Name| Description | *block* [in] | The block we want to process. Must connect to the current tip. | *chainstate* [in] | The chainstate to connect to. | *check_pow* [in] | perform proof‐of‐work check, nBits in the header is always checked | *check_merkle_root* [in] | check the merkle root |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#