Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
timwu20 committed Jul 18, 2023
1 parent bdbfa22 commit 2880d0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/runtime/wasmer/exports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ func TestInstance_ExecuteBlock_WestendBlock1097836(t *testing.T) {
*types.NewBABEPreRuntimeDigest(common.MustHexToBytes("0x02020000006522d30f00000000")),
types.SealDigest{
ConsensusEngineID: types.BabeEngineID,
Data: common.MustHexToBytes("0xa06e4a23ae347c7edd24f84153c007563895d64a06b8781b1e21bf2c8bc426676bfd4bf20c08f276e54598aff3b64541d84c4b5da7bfa39479d0a45585a75388"),
Data: common.MustHexToBytes("0xa06e4a23ae347c7edd24f84153c007563895d64a06b8781b1e21bf2c8bc426676bfd4bf20c08f276e54598aff3b64541d84c4b5da7bfa39479d0a45585a75388"), //nolint:lll
},
)

Expand All @@ -1234,7 +1234,7 @@ func TestInstance_ExecuteBlock_WestendBlock1097836(t *testing.T) {
ext, err = common.HexToBytes("0x040d0000")
require.NoError(t, err)
exts = append(exts, ext)
ext, err = common.HexToBytes("0x84c2c9676ac7a4e56bcb861cf443899114a17baa817ae5c295b9bb6f947fc427fd02db25d6a66498b5e81ac3a52ae4025eef7bb36eee31195c60c7ebdb6f0bac4177baf32e73719fe3e5fdce1059e9e16bb85bad0a0c4e34c4b0e680fb7a132cc4f7018502000004000c60f6d9b5a5ee5a0c0428d1940936a1b91cd29924578f7ac9e793db6dab0cd70700e40b5402")
ext, err = common.HexToBytes("0x84c2c9676ac7a4e56bcb861cf443899114a17baa817ae5c295b9bb6f947fc427fd02db25d6a66498b5e81ac3a52ae4025eef7bb36eee31195c60c7ebdb6f0bac4177baf32e73719fe3e5fdce1059e9e16bb85bad0a0c4e34c4b0e680fb7a132cc4f7018502000004000c60f6d9b5a5ee5a0c0428d1940936a1b91cd29924578f7ac9e793db6dab0cd70700e40b5402") //nolint:lll
require.NoError(t, err)
exts = append(exts, ext)

Expand Down
5 changes: 3 additions & 2 deletions lib/runtime/wazero/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"fmt"
"os"
"path/filepath"
"testing"

"github.com/ChainSafe/gossamer/internal/log"
Expand Down Expand Up @@ -73,9 +74,9 @@ func NewTestInstanceWithTrie(t *testing.T, targetRuntime string, tt *trie.Trie)
func NewInstanceFromFile(fp string, cfg Config) (*Instance, error) {
// Reads the WebAssembly module as bytes.
// Retrieve WASM binary
bytes, err := os.ReadFile(fp)
bytes, err := os.ReadFile(filepath.Clean(fp))
if err != nil {
return nil, fmt.Errorf("Failed to read wasm file: %s", err)
return nil, fmt.Errorf("failed to read wasm file: %s", err)
}

return NewInstance(bytes, cfg)
Expand Down

0 comments on commit 2880d0e

Please sign in to comment.