Skip to content

Commit

Permalink
internal/ethapi: use toMessage instead of creating new message
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Jul 19, 2021
1 parent 3d55247 commit 1b0b953
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/ethapi/api.go
Expand Up @@ -1421,7 +1421,12 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
if gasPrice == nil {
gasPrice = new(big.Int)
}
msg := types.NewMessage(args.from(), args.To, uint64(*args.Nonce), args.Value.ToInt(), uint64(*args.Gas), gasPrice, big.NewInt(0), big.NewInt(0), args.data(), accessList, false)
// Set the accesslist to the last al
args.AccessList = &accessList
msg, err := args.ToMessage(b.RPCGasCap(), header.BaseFee)
if err != nil {
return nil, 0, nil, err
}

// Apply the transaction with the access list tracer
tracer := vm.NewAccessListTracer(accessList, args.from(), to, precompiles)
Expand Down

0 comments on commit 1b0b953

Please sign in to comment.