mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-05-21 17:20:03 +02:00
Merge pull request #9642 from yyforyongyu/skip-blockbeat
lnd: skip setting `blockbeat` for `nochainbackend` mode
This commit is contained in:
commit
d1093cd3c3
@ -5419,6 +5419,15 @@ func (s *server) getStartingBeat() (*chainio.Beat, error) {
|
|||||||
// beat is the current blockbeat.
|
// beat is the current blockbeat.
|
||||||
var beat *chainio.Beat
|
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
|
// We should get a notification with the current best block immediately
|
||||||
// by passing a nil block.
|
// by passing a nil block.
|
||||||
blockEpochs, err := s.cc.ChainNotifier.RegisterBlockEpochNtfn(nil)
|
blockEpochs, err := s.cc.ChainNotifier.RegisterBlockEpochNtfn(nil)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user