Skip to content

Commit 1b56149

Browse files
authored
eth/tracers: fix typo and linter ethereum#25020 ethereum#24783 ethereum#25551 (#1286)
1 parent 88d7031 commit 1b56149

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

eth/tracers/api.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (context *chainContext) GetHeader(hash common.Hash, number uint64) *types.H
117117
return header
118118
}
119119

120-
// chainContext construts the context reader which is used by the evm for reading
120+
// chainContext represents the context reader which is used by the evm for reading
121121
// the necessary chain context.
122122
func (api *API) chainContext(ctx context.Context) core.ChainContext {
123123
return &chainContext{api: api, ctx: ctx}
@@ -195,10 +195,10 @@ type blockTraceTask struct {
195195
statedb *state.StateDB // Intermediate state prepped for tracing
196196
block *types.Block // Block to trace the transactions from
197197
rootref common.Hash // Trie root reference held for this task
198-
results []*txTraceResult // Trace results procudes by the task
198+
results []*txTraceResult // Trace results produced by the task
199199
}
200200

201-
// blockTraceResult represets the results of tracing a single block when an entire
201+
// blockTraceResult represents the results of tracing a single block when an entire
202202
// chain is being traced.
203203
type blockTraceResult struct {
204204
Block hexutil.Uint64 `json:"block"` // Block number corresponding to this trace
@@ -232,7 +232,7 @@ func (api *API) TraceChain(ctx context.Context, start, end rpc.BlockNumber, conf
232232

233233
// traceChain configures a new tracer according to the provided configuration, and
234234
// executes all the transactions contained within. The return value will be one item
235-
// per transaction, dependent on the requestd tracer.
235+
// per transaction, dependent on the requested tracer.
236236
func (api *API) traceChain(ctx context.Context, start, end *types.Block, config *TraceConfig) (*rpc.Subscription, error) {
237237
// Tracing a chain is a **long** operation, only do with subscriptions
238238
notifier, supported := rpc.NotifierFromContext(ctx)

eth/tracers/internal/tracetest/calltrace_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"github.com/XinFinOrg/XDPoSChain/rlp"
4040
"github.com/XinFinOrg/XDPoSChain/tests"
4141

42-
// Force-load native and js pacakges, to trigger registration
42+
// Force-load native and js packages, to trigger registration
4343
_ "github.com/XinFinOrg/XDPoSChain/eth/tracers/js"
4444
_ "github.com/XinFinOrg/XDPoSChain/eth/tracers/native"
4545
)

eth/tracers/js/internal/tracers/4byte_tracer_legacy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
return false;
4747
},
4848

49-
// store save the given indentifier and datasize.
49+
// store save the given identifier and datasize.
5050
store: function(id, size){
5151
var key = "" + toHex(id) + "-" + size;
5252
this.ids[key] = this.ids[key] + 1 || 1;

eth/tracers/tracers_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"testing"
2222

2323
"github.com/XinFinOrg/XDPoSChain/common"
24-
"github.com/XinFinOrg/XDPoSChain/common/hexutil"
2524
"github.com/XinFinOrg/XDPoSChain/core"
2625
"github.com/XinFinOrg/XDPoSChain/core/rawdb"
2726
"github.com/XinFinOrg/XDPoSChain/core/types"
@@ -32,20 +31,6 @@ import (
3231
"github.com/XinFinOrg/XDPoSChain/tests"
3332
)
3433

35-
// callTrace is the result of a callTracer run.
36-
type callTrace struct {
37-
Type string `json:"type"`
38-
From common.Address `json:"from"`
39-
To common.Address `json:"to"`
40-
Input hexutil.Bytes `json:"input"`
41-
Output hexutil.Bytes `json:"output"`
42-
Gas *hexutil.Uint64 `json:"gas,omitempty"`
43-
GasUsed *hexutil.Uint64 `json:"gasUsed,omitempty"`
44-
Value *hexutil.Big `json:"value,omitempty"`
45-
Error string `json:"error,omitempty"`
46-
Calls []callTrace `json:"calls,omitempty"`
47-
}
48-
4934
func BenchmarkTransactionTrace(b *testing.B) {
5035
key, _ := crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
5136
from := crypto.PubkeyToAddress(key.PublicKey)

0 commit comments

Comments
 (0)