mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-22 07:49:26 +00:00
internal/ethapi: pass in accesslist in test (#29089)
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
This commit is contained in:
parent
5bae14f9df
commit
9986a69c25
1 changed files with 10 additions and 7 deletions
|
|
@ -1272,10 +1272,14 @@ func TestFillBlobTransaction(t *testing.T) {
|
||||||
|
|
||||||
func argsFromTransaction(tx *types.Transaction, from common.Address) TransactionArgs {
|
func argsFromTransaction(tx *types.Transaction, from common.Address) TransactionArgs {
|
||||||
var (
|
var (
|
||||||
gas = tx.Gas()
|
gas = tx.Gas()
|
||||||
nonce = tx.Nonce()
|
nonce = tx.Nonce()
|
||||||
input = tx.Data()
|
input = tx.Data()
|
||||||
|
accessList *types.AccessList
|
||||||
)
|
)
|
||||||
|
if acl := tx.AccessList(); acl != nil {
|
||||||
|
accessList = &acl
|
||||||
|
}
|
||||||
return TransactionArgs{
|
return TransactionArgs{
|
||||||
From: &from,
|
From: &from,
|
||||||
To: tx.To(),
|
To: tx.To(),
|
||||||
|
|
@ -1286,10 +1290,9 @@ func argsFromTransaction(tx *types.Transaction, from common.Address) Transaction
|
||||||
Nonce: (*hexutil.Uint64)(&nonce),
|
Nonce: (*hexutil.Uint64)(&nonce),
|
||||||
Input: (*hexutil.Bytes)(&input),
|
Input: (*hexutil.Bytes)(&input),
|
||||||
ChainID: (*hexutil.Big)(tx.ChainId()),
|
ChainID: (*hexutil.Big)(tx.ChainId()),
|
||||||
// TODO: impl accessList conversion
|
AccessList: accessList,
|
||||||
//AccessList: tx.AccessList(),
|
BlobFeeCap: (*hexutil.Big)(tx.BlobGasFeeCap()),
|
||||||
BlobFeeCap: (*hexutil.Big)(tx.BlobGasFeeCap()),
|
BlobHashes: tx.BlobHashes(),
|
||||||
BlobHashes: tx.BlobHashes(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue