Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Oct 10, 2024
1 parent 0f117ec commit 2677e4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
4 changes: 0 additions & 4 deletions rvgo/fast/yul64.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ func shortToU64(v uint16) U64 {
return uint64(v)
}

func shortToU256(v uint16) U256 {
return *uint256.NewInt(uint64(v))
}

// nolint:unused
func longToU256(v uint64) U256 {
return *uint256.NewInt(v)
Expand Down
8 changes: 4 additions & 4 deletions rvgo/riscv/constants.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package riscv

const (
SysExitGroup = 94
SysMmap = 222
SysRead = 63
SysWrite = 64
SysExitGroup = 94
SysMmap = 222
SysRead = 63
SysWrite = 64

FdStdin = 0
FdStdout = 1
Expand Down
5 changes: 2 additions & 3 deletions rvgo/test/syscall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func runSlow(t *testing.T, stepWitness *fast.StepWitness, fastPost fast.StateWit
require.NoError(t, err)
require.Equal(t, fastPostHash, slowPostHash, "fast VM produced different state than slow VM")
}

}

func errCodeToByte32(errCode uint64) []byte {
Expand All @@ -74,7 +73,7 @@ func errCodeToByte32(errCode uint64) []byte {
func TestStateSyscallUnsupported(t *testing.T) {
contracts := testContracts(t)
addrs := testAddrs
syscalls := []int{ 0xFF }
syscalls := []int{0xFF}

for _, syscall := range syscalls {
t.Run(fmt.Sprintf("sys_%d", syscall), func(t *testing.T) {
Expand Down Expand Up @@ -533,7 +532,7 @@ func FuzzStatePreimageRead(f *testing.F) {
require.Equal(t, false, state.Exited)
if writeLen > 0 {
// Memory may be unchanged if we're writing the first zero-valued 7 bytes of the pre-image.
//require.NotEqual(t, preStateRoot, state.Memory.MerkleRoot())
// require.NotEqual(t, preStateRoot, state.Memory.MerkleRoot())
require.Greater(t, state.PreimageOffset, preimageOffset)
} else {
require.Equal(t, preStateRoot, state.Memory.MerkleRoot())
Expand Down

0 comments on commit 2677e4c

Please sign in to comment.