Skip to content

Commit

Permalink
Fix: mispells
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Feb 4, 2024
1 parent c7ec7fd commit 0cbe7fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/metadata/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (indexer *Indexer) Close() error {
}

func (indexer *Indexer) initState(ctx context.Context) error {
current, err := indexer.db.State(indexer.indexName)
current, err := indexer.db.State(ctx, indexer.indexName)
if err != nil {
if !errors.Is(err, pg.ErrNoRows) {
return err
Expand All @@ -195,7 +195,7 @@ func (indexer *Indexer) initState(ctx context.Context) error {
IndexName: indexer.indexName,
}

if err := indexer.db.CreateState(indexer.state); err != nil {
if err := indexer.db.CreateState(ctx, indexer.state); err != nil {
return err
}
} else {
Expand Down Expand Up @@ -244,7 +244,7 @@ func (indexer *Indexer) listen(ctx context.Context) {
indexer.state.Level = block.Level
indexer.state.Hash = block.Hash
indexer.state.Timestamp = block.Timestamp.UTC()
if err := indexer.db.UpdateState(indexer.state); err != nil {
if err := indexer.db.UpdateState(ctx, indexer.state); err != nil {
log.Err(err).Msg("UpdateState")
} else {
indexer.log().Msg("new block received")
Expand Down

0 comments on commit 0cbe7fa

Please sign in to comment.