@@ -10,7 +10,7 @@ import Foundation
10
10
11
11
final class KyotoService: BDKSyncService {
12
12
13
- private static let nodeHeight : UInt32 = 253_000
13
+ private static let nodeHeight : UInt32 = 300_000
14
14
15
15
static let shared = KyotoService ( )
16
16
@@ -23,7 +23,7 @@ final class KyotoService: BDKSyncService {
23
23
private var node : CbfNode ?
24
24
private var connected = false
25
25
26
- private var fullScanProgress2 : FullScanProgress ?
26
+ private var fullScanProgress : FullScanProgress ?
27
27
private var syncProgress : SyncScanProgress ?
28
28
29
29
init (
@@ -67,7 +67,7 @@ final class KyotoService: BDKSyncService {
67
67
let nodeComponents = try buildNode (
68
68
from: wallet, scanType: . recovery( fromHeight: KyotoService . nodeHeight)
69
69
)
70
- self . fullScanProgress2 = progress
70
+ self . fullScanProgress = progress
71
71
self . client = nodeComponents. client
72
72
self . node = nodeComponents. node
73
73
try await startListen ( )
@@ -108,20 +108,6 @@ final class KyotoService: BDKSyncService {
108
108
return true
109
109
}
110
110
111
- // private func continuallyUpdate() async {
112
- // Task {
113
- // while true {
114
- // guard let update = await self.client?.update() else { return }
115
- // try self.wallet?.applyUpdate(update: update)
116
- // let _ = try self.wallet?.persist(connection: self.connection ?? Connection.loadConnection())
117
- // print("######### walletUpdated")
118
- //// DispatchQueue.main.async {
119
- //// NotificationCenter.default.post(name: .walletUpdated, object: nil)
120
- //// }
121
- // }
122
- // }
123
- // }
124
-
125
111
private func printLogs( ) {
126
112
Task {
127
113
while true {
@@ -132,7 +118,7 @@ final class KyotoService: BDKSyncService {
132
118
print ( " ######### connected " )
133
119
self . connected = true
134
120
case . progress( let progress) :
135
- if let fullScanProgress = self . fullScanProgress2 {
121
+ if let fullScanProgress = self . fullScanProgress {
136
122
let _progress = UInt64 ( progress * 100.0 )
137
123
fullScanProgress ( _progress)
138
124
}
@@ -152,9 +138,6 @@ final class KyotoService: BDKSyncService {
152
138
case . needConnections:
153
139
print ( " ######### disconnected " )
154
140
self . connected = false
155
- // DispatchQueue.main.async {
156
- // NotificationCenter.default.post(name: .connectionsChanged, object: nil)
157
- // }
158
141
default :
159
142
#if DEBUG
160
143
print ( warn)
0 commit comments