<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/NotificationCallbacks/init(blockTip:headerTip:progress:warningSet:warningUnset:flushError:fatalError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel21NotificationCallbacksC8blockTip06headerF08progress10warningSet0I5Unset10flushError05fatalM0ACyAA20SynchronizationStateO_AA22BlockTreeEntrySnapshotVSdtcSg_yAL_s5Int64VAQSbtcSgySS_s5Int32VSbtcSgyAA7WarningO_SStcSgyAWcSgySScSgAZtcfc"
  },
  "title" : "init(blockTip:headerTip:progress:warningSet:warningUnset:flushError:fatalError:)"
}
-->

# init(blockTip:headerTip:progress:warningSet:warningUnset:flushError:fatalError:)

Creates notification callbacks.

```
init(blockTip: ((SynchronizationState, BlockTreeEntrySnapshot, Double) -> Void)? = nil, headerTip: ((SynchronizationState, Int64, Int64, Bool) -> Void)? = nil, progress: ((String, Int32, Bool) -> Void)? = nil, warningSet: ((Warning, String) -> Void)? = nil, warningUnset: ((Warning) -> Void)? = nil, flushError: ((String) -> Void)? = nil, fatalError: ((String) -> Void)? = nil)
```

## Parameters

`blockTip`

Handler for chain tip updates. See [`blockTip`](/documentation/BitcoinKernel/NotificationCallbacks/blockTip).

`headerTip`

Handler for new best headers. See [`headerTip`](/documentation/BitcoinKernel/NotificationCallbacks/headerTip).

`progress`

Handler for block sync progress. See [`progress`](/documentation/BitcoinKernel/NotificationCallbacks/progress).

`warningSet`

Handler for new validation warnings. See [`warningSet`](/documentation/BitcoinKernel/NotificationCallbacks/warningSet).

`warningUnset`

Handler for cleared validation warnings. See [`warningUnset`](/documentation/BitcoinKernel/NotificationCallbacks/warningUnset).

`flushError`

Handler for errors flushing data to disk. See [`flushError`](/documentation/BitcoinKernel/NotificationCallbacks/flushError).

`fatalError`

Handler for unrecoverable library errors. See [`fatalError`](/documentation/BitcoinKernel/NotificationCallbacks/fatalError).

## Discussion

Set only the callbacks you need; unset callbacks are ignored.
All closures are captured at init time and cannot be changed later.