Skip to content

Commit

Permalink
fix(trace): rename BlockTrace.Transaction to BlockTrace.Transactions (e…
Browse files Browse the repository at this point in the history
  • Loading branch information
HAOYUatHZ committed Mar 18, 2022
1 parent 3b4875c commit 9fb413d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions core/types/l2trace_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
)

type BlockTrace struct {
Number *big.Int `json:"number"`
Hash common.Hash `json:"hash"`
GasLimit uint64 `json:"gasLimit"`
Difficulty *big.Int `json:"difficulty"`
BaseFee *big.Int `json:"baseFee"`
Coinbase common.Address `json:"coinbase"`
Time uint64 `json:"time"`
Transaction []*TransactionTrace `json:"transaction"`
Number *big.Int `json:"number"`
Hash common.Hash `json:"hash"`
GasLimit uint64 `json:"gasLimit"`
Difficulty *big.Int `json:"difficulty"`
BaseFee *big.Int `json:"baseFee"`
Coinbase common.Address `json:"coinbase"`
Time uint64 `json:"time"`
Transactions []*TransactionTrace `json:"transactions"`
}

type TransactionTrace struct {
Expand All @@ -42,14 +42,14 @@ func NewTraceBlock(config *params.ChainConfig, block *Block) *BlockTrace {
txs[i] = newTraceTransaction(tx, block.NumberU64(), config)
}
return &BlockTrace{
Number: block.Number(),
Hash: block.Hash(),
GasLimit: block.GasLimit(),
Difficulty: block.Difficulty(),
BaseFee: block.BaseFee(),
Coinbase: block.Coinbase(),
Time: block.Time(),
Transaction: txs,
Number: block.Number(),
Hash: block.Hash(),
GasLimit: block.GasLimit(),
Difficulty: block.Difficulty(),
BaseFee: block.BaseFee(),
Coinbase: block.Coinbase(),
Time: block.Time(),
Transactions: txs,
}
}

Expand Down

0 comments on commit 9fb413d

Please sign in to comment.