From 8a15a4201599d62faccf4c75028480aa36fa69c9 Mon Sep 17 00:00:00 2001 From: David Zhou Date: Thu, 5 Jun 2025 15:25:10 -0400 Subject: [PATCH] FIX: Removed unused parameter spanID --- consensus/bor/contract/client.go | 2 +- consensus/bor/heimdall/span/spanner.go | 2 +- consensus/bor/statefull/processor.go | 1 - eth/tracers/api.go | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/consensus/bor/contract/client.go b/consensus/bor/contract/client.go index 910eff1d4c..42247f9614 100644 --- a/consensus/bor/contract/client.go +++ b/consensus/bor/contract/client.go @@ -93,7 +93,7 @@ func (gc *GenesisContractsClient) CommitState( log.Info("→ committing new state", "eventRecord", event.ID) - gasUsed, err := statefull.ApplyMessage(context.Background(), msg, state, header, gc.chainConfig, chCtx, 0, tracer) + gasUsed, err := statefull.ApplyMessage(context.Background(), msg, state, header, gc.chainConfig, chCtx, tracer) // Logging event log with time and individual gasUsed log.Info("→ committed new state", "eventRecord", event.String(gasUsed)) diff --git a/consensus/bor/heimdall/span/spanner.go b/consensus/bor/heimdall/span/spanner.go index 26841443b4..09433fea1d 100644 --- a/consensus/bor/heimdall/span/spanner.go +++ b/consensus/bor/heimdall/span/spanner.go @@ -336,7 +336,7 @@ func (c *ChainSpanner) CommitSpan(ctx context.Context, heimdallSpan HeimdallSpan msg := statefull.GetSystemMessage(c.validatorContractAddress, data) // apply message - _, err = statefull.ApplyMessage(ctx, msg, state, header, c.chainConfig, chainContext, 0, tracer) + _, err = statefull.ApplyMessage(ctx, msg, state, header, c.chainConfig, chainContext, tracer) return err } diff --git a/consensus/bor/statefull/processor.go b/consensus/bor/statefull/processor.go index bed739927d..e75354da97 100644 --- a/consensus/bor/statefull/processor.go +++ b/consensus/bor/statefull/processor.go @@ -71,7 +71,6 @@ func ApplyMessage( header *types.Header, chainConfig *params.ChainConfig, chainContext core.ChainContext, - spanID int64, tracer *tracing.Hooks, ) (uint64, error) { diff --git a/eth/tracers/api.go b/eth/tracers/api.go index 1e01331694..43ba248c8d 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -711,7 +711,7 @@ func (api *API) IntermediateRoots(ctx context.Context, hash common.Hash, config if *config.BorTraceEnabled { callmsg := prepareCallMessage(*msg) statedb.SetTxContext(stateSyncHash, i) - if _, err := statefull.ApplyMessage(ctx, callmsg, statedb, block.Header(), api.backend.ChainConfig(), api.chainContext(ctx), 0, nil); err != nil { + if _, err := statefull.ApplyMessage(ctx, callmsg, statedb, block.Header(), api.backend.ChainConfig(), api.chainContext(ctx), nil); err != nil { log.Warn("Tracing intermediate roots did not complete", "txindex", i, "txhash", stateSyncHash, "err", err) // We intentionally don't return the error here: if we do, then the RPC server will not // return the roots. Most likely, the caller already knows that a certain transaction fails to