Skip to content

Commit

Permalink
Add log
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Oct 17, 2023
1 parent 45917ca commit 9d48e47
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/indexer/indexer/initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func (initializer Initializer) Init(ctx context.Context) error {
return err
}
firstBlock, err := initializer.block.Get(ctx, 1)
log.Info().Str("node_hash", blockHash).Str("indexer_hash", firstBlock.Hash).Msg("checking first block hash...")
if err == nil && firstBlock.Hash != blockHash {
log.Info().Str("network", initializer.network.String()).Msg("found new periodic chain")
log.Warn().Str("network", initializer.network.String()).Msg("drop database...")
Expand Down

0 comments on commit 9d48e47

Please sign in to comment.