wallet: fix nil dereference in rescanprogress ntfn handler
This commit is contained in:
parent
8e2c741f88
commit
5113a64617
1 changed files with 6 additions and 0 deletions
|
@ -123,6 +123,12 @@ out:
|
||||||
case n := <-w.rescanNotifications:
|
case n := <-w.rescanNotifications:
|
||||||
switch n := n.(type) {
|
switch n := n.(type) {
|
||||||
case *chain.RescanProgress:
|
case *chain.RescanProgress:
|
||||||
|
if curBatch == nil {
|
||||||
|
log.Warnf("Received rescan progress " +
|
||||||
|
"notification but no rescan " +
|
||||||
|
"currently running")
|
||||||
|
continue
|
||||||
|
}
|
||||||
w.rescanProgress <- &RescanProgressMsg{
|
w.rescanProgress <- &RescanProgressMsg{
|
||||||
Addresses: curBatch.addrs,
|
Addresses: curBatch.addrs,
|
||||||
Notification: n,
|
Notification: n,
|
||||||
|
|
Loading…
Reference in a new issue