refactor: rename NewTraceTransaction to NewTransactionData (#190)

rename NewTraceTransaction to NewTransactionData
This commit is contained in:
maskpp 2022-12-02 14:12:07 +08:00 committed by GitHub
parent 016b30eb7d
commit 804e7edc23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -165,9 +165,9 @@ type TransactionData struct {
S *hexutil.Big `json:"s"`
}
// NewTraceTransaction returns a transaction that will serialize to the trace
// NewTransactionData returns a transaction that will serialize to the trace
// representation, with the given location metadata set (if available).
func NewTraceTransaction(tx *Transaction, blockNumber uint64, config *params.ChainConfig) *TransactionData {
func NewTransactionData(tx *Transaction, blockNumber uint64, config *params.ChainConfig) *TransactionData {
signer := MakeSigner(config, big.NewInt(0).SetUint64(blockNumber))
from, _ := Sender(signer, tx)
v, r, s := tx.RawSignatureValues()

View file

@ -334,7 +334,7 @@ func (api *API) fillBlockTrace(env *traceEnv, block *types.Block) (*types.BlockT
txs := make([]*types.TransactionData, block.Transactions().Len())
for i, tx := range block.Transactions() {
txs[i] = types.NewTraceTransaction(tx, block.NumberU64(), api.backend.ChainConfig())
txs[i] = types.NewTransactionData(tx, block.NumberU64(), api.backend.ChainConfig())
}
blockTrace := &types.BlockTrace{