From 5113a646174677ee804f5eac1dd9d549aa13a329 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 21 Sep 2017 15:16:12 -0600 Subject: [PATCH] wallet: fix nil dereference in rescanprogress ntfn handler --- wallet/rescan.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wallet/rescan.go b/wallet/rescan.go index 6ea66aa..f62220c 100644 --- a/wallet/rescan.go +++ b/wallet/rescan.go @@ -123,6 +123,12 @@ out: case n := <-w.rescanNotifications: switch n := n.(type) { case *chain.RescanProgress: + if curBatch == nil { + log.Warnf("Received rescan progress " + + "notification but no rescan " + + "currently running") + continue + } w.rescanProgress <- &RescanProgressMsg{ Addresses: curBatch.addrs, Notification: n,