Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 736ddf0

Browse files
ziggie1984adrienlacombe
authored andcommitted
don't unload wallet if we are still scanning when shutting done
1 parent 19876f0 commit 736ddf0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

bus/infrastructure.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ func (b *Bus) Close(ctx context.Context) {
218218
b.mainClient.Shutdown()
219219
b.secondaryClient.Shutdown()
220220

221-
b.UnloadWallet()
221+
// Only unload wallet if we are not in a pending scan
222+
// otherwise the nuclear timeout corrupts the wallet state
223+
if !b.IsPendingScan {
224+
b.UnloadWallet()
225+
}
222226
done <- true
223227
}()
224228

bus/wallet.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ func (b *Bus) AbortRescan() error {
320320
"prefix": "AbortRescan",
321321
}).Infof("Abort rescan successful: %t", abortRescan)
322322

323+
b.IsPendingScan = false
324+
323325
return nil
324326

325327
}

0 commit comments

Comments
 (0)