cmd/utils, core/tracing: tiny fix

This commit is contained in:
Gary Rong 2025-01-23 14:46:24 +08:00
parent 3546df65c1
commit f59b1be4f7
2 changed files with 1 additions and 2 deletions

View file

@ -450,7 +450,7 @@ func ExportHistory(bc *core.BlockChain, dir string, first, last, step uint64) er
return fmt.Errorf("export failed on #%d: receipts not found", n)
}
td.Add(td, block.Difficulty())
if err := w.Add(block, receipts, td); err != nil {
if err := w.Add(block, receipts, new(big.Int).Set(td)); err != nil {
return err
}
}

View file

@ -63,7 +63,6 @@ type VMContext struct {
// It contains the block as well as consensus related information.
type BlockEvent struct {
Block *types.Block
TD *big.Int
Finalized *types.Header
Safe *types.Header
}