<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/BlockchainSync/updates()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel14BlockchainSyncV7updatesAC7UpdatesVyF"
  },
  "title" : "updates()"
}
-->

# updates()

Starts the sync and returns a typed async sequence of progress
snapshots.

```
func updates() -> BlockchainSync.Updates
```

## Return Value

A single-consumer [`BlockchainSync.Updates`](/documentation/BitcoinKernel/BlockchainSync/Updates) sequence. Iterating the
same sequence concurrently is undefined behavior — call
`updates()` again for a second consumer.

## Discussion

Each call to `updates()` starts a fresh sync run — a `Task` spawns
to drive the state machine. To stop a run, break the `for await`
loop or cancel the enclosing `Task`; the iterator’s cleanup (via
`AsyncStream.onTermination`) calls [`interrupt()`](/documentation/BitcoinKernel/Context/interrupt()) to
unblock any in-flight kernel processing.