Skip to content

Commit c13fc74

Browse files
committed
testing kyoto
1 parent bf844b5 commit c13fc74

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

BDKSwiftExampleWallet/Service/BDK Service/BDKService.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import Foundation
1111
private class BDKService {
1212
static var shared: BDKService = BDKService()
1313

14-
// private let service: BDKSyncService = KyotoService()
15-
private let service: BDKSyncService = EsploraService()
14+
private let service: BDKSyncService = KyotoService()
15+
// private let service: BDKSyncService = EsploraService()
1616

1717
private var balance: Balance?
1818
private var connection: Connection?

BDKSwiftExampleWallet/Service/BDKSyncService/KyotoService.swift

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010

1111
final class KyotoService: BDKSyncService {
1212

13-
private static let nodeHeight: UInt32 = 251_000
13+
private static let nodeHeight: UInt32 = 253_000
1414

1515
static let shared = KyotoService()
1616

@@ -91,7 +91,6 @@ final class KyotoService: BDKSyncService {
9191
node?.run()
9292
printLogs()
9393
updateWarn()
94-
// await continuallyUpdate()
9594
try await startUpdating()
9695
}
9796

@@ -105,19 +104,19 @@ final class KyotoService: BDKSyncService {
105104
return true
106105
}
107106

108-
private func continuallyUpdate() async {
109-
Task {
110-
while true {
111-
guard let update = await self.client?.update() else { return }
112-
try self.wallet?.applyUpdate(update: update)
113-
let _ = try self.wallet?.persist(connection: self.connection ?? Connection.loadConnection())
114-
print("######### walletUpdated")
115-
// DispatchQueue.main.async {
116-
// NotificationCenter.default.post(name: .walletUpdated, object: nil)
117-
// }
118-
}
119-
}
120-
}
107+
// private func continuallyUpdate() async {
108+
// Task {
109+
// while true {
110+
// guard let update = await self.client?.update() else { return }
111+
// try self.wallet?.applyUpdate(update: update)
112+
// let _ = try self.wallet?.persist(connection: self.connection ?? Connection.loadConnection())
113+
// print("######### walletUpdated")
114+
//// DispatchQueue.main.async {
115+
//// NotificationCenter.default.post(name: .walletUpdated, object: nil)
116+
//// }
117+
// }
118+
// }
119+
// }
121120

122121
private func printLogs() {
123122
Task {

0 commit comments

Comments
 (0)