@@ -1282,7 +1282,7 @@ type accessListResult struct {
1282
1282
1283
1283
// CreateAccessList creates an EIP-2930 type AccessList for the given transaction.
1284
1284
// Reexec and BlockNrOrHash can be specified to create the accessList on top of a certain state.
1285
- func (api * BlockChainAPI ) CreateAccessList (ctx context.Context , args TransactionArgs , state * state. StateDB , blockNrOrHash * rpc.BlockNumberOrHash ) (* accessListResult , error ) {
1285
+ func (api * BlockChainAPI ) CreateAccessList (ctx context.Context , args TransactionArgs , blockNrOrHash * rpc.BlockNumberOrHash ) (* accessListResult , error ) {
1286
1286
bNrOrHash := rpc .BlockNumberOrHashWithNumber (rpc .LatestBlockNumber )
1287
1287
if blockNrOrHash != nil {
1288
1288
bNrOrHash = * blockNrOrHash
@@ -1302,7 +1302,7 @@ func (api *BlockChainAPI) CreateAccessList(ctx context.Context, args Transaction
1302
1302
}
1303
1303
}
1304
1304
1305
- acl , gasUsed , vmerr , err := AccessList (ctx , api .b , bNrOrHash , args , state )
1305
+ acl , gasUsed , vmerr , err := AccessList (ctx , api .b , bNrOrHash , args )
1306
1306
if err != nil {
1307
1307
return nil , err
1308
1308
}
@@ -1316,12 +1316,13 @@ func (api *BlockChainAPI) CreateAccessList(ctx context.Context, args Transaction
1316
1316
// AccessList creates an access list for the given transaction.
1317
1317
// If the accesslist creation fails an error is returned.
1318
1318
// If the transaction itself fails, an vmErr is returned.
1319
- func AccessList (ctx context.Context , b Backend , blockNrOrHash rpc.BlockNumberOrHash , args TransactionArgs , state * state. StateDB ) (acl types.AccessList , gasUsed uint64 , vmErr error , err error ) {
1319
+ func AccessList (ctx context.Context , b Backend , blockNrOrHash rpc.BlockNumberOrHash , args TransactionArgs ) (acl types.AccessList , gasUsed uint64 , vmErr error , err error ) {
1320
1320
// Retrieve the execution context
1321
1321
db , header , err := b .StateAndHeaderByNumberOrHash (ctx , blockNrOrHash )
1322
1322
if db == nil || err != nil {
1323
1323
return nil , 0 , nil , err
1324
1324
}
1325
+ state := db
1325
1326
1326
1327
// Ensure any missing fields are filled, extract the recipient and input data
1327
1328
if err = args .setFeeDefaults (ctx , b , header ); err != nil {
0 commit comments