diff --git a/lib/ios/Ldk.swift b/lib/ios/Ldk.swift index 61aeb150..32dd50a5 100644 --- a/lib/ios/Ldk.swift +++ b/lib/ios/Ldk.swift @@ -496,10 +496,19 @@ class Ldk: NSObject { //Reset only objects created by initChannelManager channelManagerConstructor?.interrupt() channelManagerConstructor = nil + chainMonitor = nil channelManager = nil peerManager = nil peerHandler = nil + chainMonitor = ChainMonitor( + chainSource: filter, + broadcaster: broadcaster, + logger: logger, + feeest: feeEstimator, + persister: persister + ) + LdkEventEmitter.shared.send(withEvent: .native_log, body: "Starting LDK background tasks again") initChannelManager(currentNetwork, blockHash: currentBlockchainTipHash, blockHeight: currentBlockchainHeight) { success in //Notify JS that a sync is required