Skip to content

Commit

Permalink
added missing mocks for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mralj committed Oct 4, 2024
1 parent e9a5c28 commit 56c1f67
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/vm/contracts_rollup.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (c *L1SLoad) Run(input []byte) ([]byte, error) {
thereIsAtLeast1StorageKeyToRead := countOfStorageKeysToRead > 0
allStorageKeysAreExactly32Bytes := countOfStorageKeysToRead*common.HashLength == len(input)-common.AddressLength

if inputIsValid := thereIsAtLeast1StorageKeyToRead && allStorageKeysAreExactly32Bytes; !inputIsValid {
if inputIsInvalid := !(thereIsAtLeast1StorageKeyToRead && allStorageKeysAreExactly32Bytes); inputIsInvalid {
return nil, errors.New("L1SLOAD input is malformed")
}

Expand Down
7 changes: 7 additions & 0 deletions eth/tracers/api_rollup_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tracers

import "github.com/ethereum/go-ethereum/core/vm"

func (b *testBackend) GetL1RpcClient() vm.L1RpcClient {
return nil
}
7 changes: 7 additions & 0 deletions internal/ethapi/api_rollup_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ethapi

import "github.com/ethereum/go-ethereum/core/vm"

func (b *testBackend) GetL1RpcClient() vm.L1RpcClient {
return nil
}
7 changes: 7 additions & 0 deletions internal/ethapi/transaction_args_rollup_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ethapi

import "github.com/ethereum/go-ethereum/core/vm"

func (b *backendMock) GetL1RpcClient() vm.L1RpcClient {
return nil
}

0 comments on commit 56c1f67

Please sign in to comment.