Skip to content

Commit

Permalink
- removing debug log
Browse files Browse the repository at this point in the history
- implementing lib num logic
  • Loading branch information
Eduard-Voiculescu committed Sep 20, 2024
1 parent 53ea3ca commit 4bd69dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,6 @@ type blockProcessingResult struct {
func (bc *BlockChain) processBlock(block *types.Block, statedb *state.StateDB, start time.Time, setHead bool) (_ *blockProcessingResult, blockEndErr error) {
if bc.logger != nil && bc.logger.OnBlockStart != nil {
td := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
fmt.Println("DOUDOU: finalized block event", bc.CurrentFinalBlock())
bc.logger.OnBlockStart(tracing.BlockEvent{
Block: block,
TD: td,
Expand Down
4 changes: 4 additions & 0 deletions eth/tracers/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,10 @@ func (f *Firehose) printBlockToFirehose(block *pbeth.Block, finalityStatus *Fina
}
}

if block.Number-libNum >= 200 {
libNum = block.Number - 200
}

// **Important* The final space in the Sprintf template is mandatory!
f.outputBuffer.WriteString(fmt.Sprintf("FIRE BLOCK %d %s %d %s %d %d ", block.Number, hex.EncodeToString(block.Hash), previousNum, previousHash, libNum, block.Time().UnixNano()))

Expand Down

0 comments on commit 4bd69dc

Please sign in to comment.