Instance Method
updates()
Starts the sync and returns a typed async sequence of progress snapshots.
func updates() -> BlockchainSync.Updates
Return Value
A single-consumer 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() to unblock any in-flight kernel processing.