Skip to content

Commit d1093cd

Browse files
authored
Merge pull request #9642 from yyforyongyu/skip-blockbeat
lnd: skip setting `blockbeat` for `nochainbackend` mode
2 parents cf35be8 + ab90044 commit d1093cd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

server.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5419,6 +5419,15 @@ func (s *server) getStartingBeat() (*chainio.Beat, error) {
54195419
// beat is the current blockbeat.
54205420
var beat *chainio.Beat
54215421

5422+
// If the node is configured with nochainbackend mode (remote signer),
5423+
// we will skip fetching the best block.
5424+
if s.cfg.Bitcoin.Node == "nochainbackend" {
5425+
srvrLog.Info("Skipping block notification for nochainbackend " +
5426+
"mode")
5427+
5428+
return &chainio.Beat{}, nil
5429+
}
5430+
54225431
// We should get a notification with the current best block immediately
54235432
// by passing a nil block.
54245433
blockEpochs, err := s.cc.ChainNotifier.RegisterBlockEpochNtfn(nil)

0 commit comments

Comments
 (0)