diff --git a/service/bfg/bfg.go b/service/bfg/bfg.go index a5ca7233..04c83f1b 100644 --- a/service/bfg/bfg.go +++ b/service/bfg/bfg.go @@ -318,10 +318,12 @@ func (s *Server) tipChangeChecker(ctx context.Context) { continue } - log.Tracef("checking for missing blocks, walking from tip %d to %d", height, s.cfg.BTCStartHeight) + log.Tracef("checking for missing blocks, walking from tip %d to %d or first known block from tip", height, s.cfg.BTCStartHeight) for height > s.cfg.BTCStartHeight { err := s.processBitcoinBlock(ctx, height, true) + + // we have seen this block, done walking back if errors.Is(err, database.ErrDuplicate) { log.Tracef("block is already found, exiting") break