Skip to content

Commit

Permalink
(lts-backport) debug logs during reindexing
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed Sep 9, 2024
1 parent a9cc093 commit b590bce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vochain/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ func (idx *Indexer) ReindexBlocks(inTest bool) {
// Blocks
func() {
idxBlock, err := idx.readOnlyQuery.GetBlockByHeight(context.TODO(), b.Height)
if height%10000 == 1 {
log.Warnf("reindexing height %d, filling (%s, %x, %x, %x) on top of current %+v",
height, b.ChainID, b.Hash(), b.ProposerAddress, b.LastBlockID.Hash, idxBlock)
}
if err == nil && idxBlock.Time != b.Time {
log.Errorf("while reindexing blocks, block %d timestamp in db (%s) differs from blockstore (%s), leaving untouched", height, idxBlock.Time, b.Time)
return
Expand Down

0 comments on commit b590bce

Please sign in to comment.