From ab9004492e6bdf599b34cc7cb771161fe940bca3 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 25 Mar 2025 15:11:21 +0800 Subject: [PATCH] lnd: skip setting `blockbeat` for `nochainbackend` mode If we are in `nochainbackend` mode, we need to skip fetching the best block during startup, otherwise it will be blocked. --- server.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server.go b/server.go index 38243c289..34119d649 100644 --- a/server.go +++ b/server.go @@ -5410,6 +5410,15 @@ func (s *server) getStartingBeat() (*chainio.Beat, error) { // beat is the current blockbeat. var beat *chainio.Beat + // If the node is configured with nochainbackend mode (remote signer), + // we will skip fetching the best block. + if s.cfg.Bitcoin.Node == "nochainbackend" { + srvrLog.Info("Skipping block notification for nochainbackend " + + "mode") + + return &chainio.Beat{}, nil + } + // We should get a notification with the current best block immediately // by passing a nil block. blockEpochs, err := s.cc.ChainNotifier.RegisterBlockEpochNtfn(nil)