Skip to content

Commit

Permalink
[Electric-Coin-Company#1482] Fix the wipe function
Browse files Browse the repository at this point in the history
- Added a code that's stoping and cleaning up the Synchronizer, will test if it helps

[Electric-Coin-Company#1482] Fix the wipe function

- stop and start the synchronizer
  • Loading branch information
LukasKorba committed Sep 2, 2024
1 parent ff70d89 commit 152b996
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,14 @@ public class SDKSynchronizer: Synchronizer {
)

do {
//try await switchTo(endpoint: initializer.endpoint)
let status = await self.status
if status != .stopped && status != .disconnected {
await blockProcessor.stop()
}
if status != .unprepared {
try await start(retry: true)
}
try await blockProcessor.wipe(context: context)
} catch {
subject.send(completion: .failure(error))
Expand Down

0 comments on commit 152b996

Please sign in to comment.