<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/BlockchainSync/Update/State-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel14BlockchainSyncV6UpdateV5StateO"
  },
  "title" : "BlockchainSync.Update.State"
}
-->

# BlockchainSync.Update.State

Lifecycle phase of a sync run. Mirrors Bitcoin Core’s
[`SynchronizationState`](https://github.com/bitcoin/bitcoin/blob/master/src/validationinterface.h)
conceptually while remaining a distinct Swift type — see
[`SynchronizationState`](/documentation/BitcoinKernel/SynchronizationState) for how the two enums differ.

```
enum State
```

## Overview

A sync run produces exactly one emission per state transition:
exactly one [`BlockchainSync.Update.State.preparing`](/documentation/BitcoinKernel/BlockchainSync/Update/State-swift.enum/preparing), zero or more [`BlockchainSync.Update.State.syncing`](/documentation/BitcoinKernel/BlockchainSync/Update/State-swift.enum/syncing), and exactly
one of [`BlockchainSync.Update.State.finished`](/documentation/BitcoinKernel/BlockchainSync/Update/State-swift.enum/finished) or [`BlockchainSync.Update.State.failed(_:)`](/documentation/BitcoinKernel/BlockchainSync/Update/State-swift.enum/failed(_:)). Cancellation produces no
final emission at all — the sequence ends silently.