<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/BlockValidationState",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel20BlockValidationStateC"
  },
  "title" : "BlockValidationState"
}
-->

# BlockValidationState

The validation state of a block after processing — a (mode, result)
pair describing whether the kernel accepted the block and, if not, why.

```
final class BlockValidationState
```

## Overview

Pass to [`processBlockHeader(_:state:)`](/documentation/BitcoinKernel/ChainstateManager/processBlockHeader(_:state:)) as an
out-parameter; the kernel populates it with the verdict. Read
[`validationMode`](/documentation/BitcoinKernel/BlockValidationState/validationMode) for the high-level status and
[`blockValidationResult`](/documentation/BitcoinKernel/BlockValidationState/blockValidationResult) for the granular reason on rejection.

Wraps the opaque `btck_BlockValidationState` type; `deinit` calls
`btck_block_validation_state_destroy` when the last Swift reference
drops.