From f59b1be4f7b48a7d01138c608b0563c59a1b24f7 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Thu, 23 Jan 2025 14:46:24 +0800 Subject: [PATCH] cmd/utils, core/tracing: tiny fix --- cmd/utils/cmd.go | 2 +- core/tracing/hooks.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 2891e66fbb..de5918a722 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -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 } } diff --git a/core/tracing/hooks.go b/core/tracing/hooks.go index 4343edfe86..da364444ed 100644 --- a/core/tracing/hooks.go +++ b/core/tracing/hooks.go @@ -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 }