wallet: fix nil dereference in rescanprogress ntfn handler

This commit is contained in:
Alex 2017-09-21 15:16:12 -06:00 committed by Olaoluwa Osuntokun
parent 8e2c741f88
commit 5113a64617

View file

@ -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,