Skip to content

Commit

Permalink
Fix some printing
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopeereboom committed Aug 21, 2024
1 parent 016e7e8 commit 4d24bad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion service/tbc/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ func (s *Server) UtxoIndexer(ctx context.Context, endHash *chainhash.Hash) error
}
direction, err := s.UtxoIndexIsLinear(ctx, endHash)
if err != nil {
return fmt.Errorf("TxIndexIsLinear: %w", err)
return fmt.Errorf("UtxoIndexIsLinear: %w", err)
}
switch direction {
case 1:
Expand Down Expand Up @@ -1061,6 +1061,9 @@ func (s *Server) IndexIsLinear(ctx context.Context, startHash, endHash *chainhas
e = endBH.BlockHash()
default:
// This is a fork and thus not linear.
log.Infof("startBH %v %v", startBH, startBH.Difficulty)
log.Infof("endBH %v %v", endBH, endBH.Difficulty)
log.Infof("direction %v", direction)
return 0, ErrNotLinear
}
for {
Expand Down
2 changes: 1 addition & 1 deletion service/tbc/tbc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ func (s *Server) handleBlock(ctx context.Context, p *peer, msg *wire.MsgBlock) {
}

// Whatever happens, delete from cache and potentially try again
log.Infof("inserted block at height %d, parent hash %s", height, block.MsgBlock().Header.PrevBlock)
log.Debugf("inserted block at height %d, parent hash %s", height, block.MsgBlock().Header.PrevBlock)
var (
printStats bool
blocksSize uint64
Expand Down

0 comments on commit 4d24bad

Please sign in to comment.