Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Feb 15, 2024
1 parent f40e14e commit ab07c11
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions crypto/txsigner_london_berlin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func TestLondonSignerSender(t *testing.T) {
require.NoError(t, err, "unable to generate private key")

var txn *types.Transaction

switch tc.txType {
case types.AccessListTx:
txn = types.NewTx(&types.AccessListTxn{
Expand Down
1 change: 1 addition & 0 deletions state/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ func (t *Transition) apply(msg *types.Transaction) (*runtime.ExecutionResult, er
if err := t.state.IncrNonce(msg.From()); err != nil {
return nil, err
}

result = t.Call2(msg.From(), *(msg.To()), msg.Input(), value, gasLeft, initialAccessList)
}

Expand Down
1 change: 1 addition & 0 deletions state/runtime/evm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func (c *state) calculateGasForEIP2929(addr types.Address) uint64 {
gas = WarmStorageReadCostEIP2929
} else {
gas = ColdAccountAccessCostEIP2929

c.msg.AddToJournal(&runtime.AccessListAddAccountChange{Address: addr})
c.msg.AccessList.AddAddress(addr)
}
Expand Down
7 changes: 6 additions & 1 deletion state/runtime/evm/instructions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1623,17 +1623,21 @@ func Test_opSload(t *testing.T) {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

s, closeFn := getState(tt.config)
defer closeFn()

s.msg = tt.contract
s.gas = tt.initState.gas
s.sp = tt.initState.sp
s.stack = tt.initState.stack
s.memory = tt.initState.memory
s.config = tt.config
s.host = tt.mockHost
tt.contract.AccessList = tt.initState.accessList
s.msg.AccessList = tt.initState.accessList

opSload(s)

assert.Equal(t, tt.resultState.gas, s.gas, "gas in state after execution is not correct")
assert.Equal(t, tt.resultState.sp, s.sp, "sp in state after execution is not correct")
assert.Equal(t, tt.resultState.stack, s.stack, "stack in state after execution is not correct")
Expand Down Expand Up @@ -2382,6 +2386,7 @@ func Test_opCall(t *testing.T) {
test := tt
t.Run(test.name, func(t *testing.T) {
t.Parallel()

state, closeFn := getState(&test.config)
defer closeFn()

Expand Down

0 comments on commit ab07c11

Please sign in to comment.