Skip to content

Commit

Permalink
Fixing linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
cokicm committed Mar 20, 2024
1 parent 17652ee commit 8cd60f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions state/runtime/evm/instructions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,8 @@ func TestMStore8(t *testing.T) {
s, closeFn := getState(&chain.ForksInTime{})
defer closeFn()

s.push(one256) //value
s.push(*offsetStore) //offset
s.push(one256) // value
s.push(*offsetStore) // offset

opMStore8(s)

Expand Down Expand Up @@ -1171,9 +1171,9 @@ func TestCodeCopyLenZero(t *testing.T) {

var expectedGas = s.gas

s.push(zero256) //length
s.push(zero256) //dataOffset
s.push(zero256) //memOffset
s.push(zero256) // length
s.push(zero256) // dataOffset
s.push(zero256) // memOffset

opCodeCopy(s)

Expand Down
2 changes: 1 addition & 1 deletion state/runtime/evm/optimized_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (s *OptimizedStack) push(val uint256.Int) {
func (s *OptimizedStack) pop() (uint256.Int, error) {
if s.sp == 0 {
// The stack is empty, return a zero value and an underflow error
return *new(uint256.Int), &runtime.StackUnderflowError{}
return *uint256.NewInt(0), &runtime.StackUnderflowError{}
}

o := s.data[s.sp-1] // Get the top element
Expand Down

0 comments on commit 8cd60f2

Please sign in to comment.