Skip to content

Commit

Permalink
internal/ethapi: pass in accesslist in test (ethereum#29089)
Browse files Browse the repository at this point in the history
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
  • Loading branch information
buddh0 and s1na authored Feb 28, 2024
1 parent 5bae14f commit 9986a69
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions internal/ethapi/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,14 @@ func TestFillBlobTransaction(t *testing.T) {

func argsFromTransaction(tx *types.Transaction, from common.Address) TransactionArgs {
var (
gas = tx.Gas()
nonce = tx.Nonce()
input = tx.Data()
gas = tx.Gas()
nonce = tx.Nonce()
input = tx.Data()
accessList *types.AccessList
)
if acl := tx.AccessList(); acl != nil {
accessList = &acl
}
return TransactionArgs{
From: &from,
To: tx.To(),
Expand All @@ -1286,10 +1290,9 @@ func argsFromTransaction(tx *types.Transaction, from common.Address) Transaction
Nonce: (*hexutil.Uint64)(&nonce),
Input: (*hexutil.Bytes)(&input),
ChainID: (*hexutil.Big)(tx.ChainId()),
// TODO: impl accessList conversion
//AccessList: tx.AccessList(),
BlobFeeCap: (*hexutil.Big)(tx.BlobGasFeeCap()),
BlobHashes: tx.BlobHashes(),
AccessList: accessList,
BlobFeeCap: (*hexutil.Big)(tx.BlobGasFeeCap()),
BlobHashes: tx.BlobHashes(),
}
}

Expand Down

0 comments on commit 9986a69

Please sign in to comment.