From ee65841d80c2fbc4ee2fca42391d43d7683c5ba3 Mon Sep 17 00:00:00 2001 From: ziggie Date: Mon, 3 Feb 2025 10:29:47 +0100 Subject: [PATCH] chain: update scanning state of neutrino client --- chain/neutrino.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/chain/neutrino.go b/chain/neutrino.go index bdeb19cecd..6eaad76801 100644 --- a/chain/neutrino.go +++ b/chain/neutrino.go @@ -801,9 +801,18 @@ out: case err := <-rescanErr: if err != nil { - log.Errorf("Neutrino rescan ended with error: %s", err) + log.Errorf("Neutrino rescan ended with "+ + "error: %s", err) } + // We need to signal to the client that the rescan + // has finished otherwise updates to the rescan + // object will fail. + log.Info("Neutrino rescan finished") + s.clientMtx.Lock() + s.scanning = false + s.clientMtx.Unlock() + case s.currentBlock <- bs: case <-s.quit: