Skip to content

Commit 2db3756

Browse files
committed
staticaddr: feed manager with initial block height
1 parent 2faf7cc commit 2db3756

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: loopd/daemon.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,8 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
564564
Store: store,
565565
WalletKit: d.lnd.WalletKit,
566566
ChainParams: d.lnd.ChainParams,
567+
ChainNotifier: d.lnd.ChainNotifier,
568+
Signer: d.lnd.Signer,
567569
}
568570
staticAddressManager := staticaddr.NewAddressManager(cfg)
569571

@@ -666,8 +668,15 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
666668
go func() {
667669
defer d.wg.Done()
668670

671+
// Lnd's GetInfo call supplies us with the current block height.
672+
info, err := d.lnd.Client.GetInfo(d.mainCtx)
673+
if err != nil {
674+
d.internalErrChan <- err
675+
return
676+
}
677+
669678
log.Info("Starting static address manager...")
670-
err = staticAddressManager.Run(d.mainCtx)
679+
err = staticAddressManager.Run(d.mainCtx, info.BlockHeight)
671680
if err != nil && !errors.Is(context.Canceled, err) {
672681
d.internalErrChan <- err
673682
}

0 commit comments

Comments
 (0)