mirror of
https://github.com/alexgo-io/gaze-indexer.git
synced 2026-04-30 20:52:01 +08:00
@@ -58,6 +58,7 @@ func (i *BitcoinIndexer) Run(ctx context.Context) (err error) {
|
||||
|
||||
// TODO:
|
||||
// - compare db version in constants and database
|
||||
// - compare current network and local indexed network
|
||||
// - update indexer stats
|
||||
|
||||
ticker := time.NewTicker(10 * time.Second)
|
||||
@@ -67,8 +68,6 @@ func (i *BitcoinIndexer) Run(ctx context.Context) (err error) {
|
||||
case <-ctx.Done():
|
||||
return nil
|
||||
case <-ticker.C:
|
||||
ctx := logger.WithContext(ctx, slog.Int64("current_block_height", i.currentBlock.Height))
|
||||
|
||||
if err := i.process(ctx); err != nil {
|
||||
logger.ErrorContext(ctx, "failed to process", slogx.Error(err))
|
||||
return errors.Wrap(err, "failed to process")
|
||||
|
||||
Reference in New Issue
Block a user