mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
add accessList field only when tx.AccessList() not nil
This commit is contained in:
parent
2a505a3e45
commit
bde2f0f705
1 changed files with 9 additions and 5 deletions
|
|
@ -1272,11 +1272,15 @@ func TestFillBlobTransaction(t *testing.T) {
|
|||
|
||||
func argsFromTransaction(tx *types.Transaction, from common.Address) TransactionArgs {
|
||||
var (
|
||||
gas = tx.Gas()
|
||||
nonce = tx.Nonce()
|
||||
input = tx.Data()
|
||||
accessList = tx.AccessList()
|
||||
gas = tx.Gas()
|
||||
nonce = tx.Nonce()
|
||||
input = tx.Data()
|
||||
accessList = (*types.AccessList)(nil)
|
||||
txAccessList = tx.AccessList()
|
||||
)
|
||||
if txAccessList != nil {
|
||||
accessList = &txAccessList
|
||||
}
|
||||
return TransactionArgs{
|
||||
From: &from,
|
||||
To: tx.To(),
|
||||
|
|
@ -1287,7 +1291,7 @@ func argsFromTransaction(tx *types.Transaction, from common.Address) Transaction
|
|||
Nonce: (*hexutil.Uint64)(&nonce),
|
||||
Input: (*hexutil.Bytes)(&input),
|
||||
ChainID: (*hexutil.Big)(tx.ChainId()),
|
||||
AccessList: &accessList,
|
||||
AccessList: accessList,
|
||||
BlobFeeCap: (*hexutil.Big)(tx.BlobGasFeeCap()),
|
||||
BlobHashes: tx.BlobHashes(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue