Skip to content

Commit

Permalink
defer ReindexBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed Sep 9, 2024
1 parent 50aeb10 commit 782f147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vochain/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (idx *Indexer) startDB() error {

if gooseMigrationsPending(idx.readWriteDB, "migrations") {
log.Info("indexer db needs migration, scheduling a reindex after sync")
go idx.ReindexBlocks(false)
defer func() { go idx.ReindexBlocks(false) }()
}

if err := goose.Up(idx.readWriteDB, "migrations"); err != nil {
Expand Down

0 comments on commit 782f147

Please sign in to comment.