diff --git a/lib/runtime/newWasmer/memory.go b/lib/runtime/newWasmer/memory.go index 3c4586b544..e18f8856ee 100644 --- a/lib/runtime/newWasmer/memory.go +++ b/lib/runtime/newWasmer/memory.go @@ -1,14 +1,14 @@ // Copyright 2023 ChainSafe Systems (ON) // SPDX-License-Identifier: LGPL-3.0-only -package wasmer +package latestwasmer import ( "errors" "fmt" "math" - wasmgo "github.com/wasmerio/wasmer-go/wasmer" + "github.com/wasmerio/wasmer-go/wasmer" ) var ( @@ -19,7 +19,7 @@ var ( // Memory is a thin wrapper around Wasmer memory to support // Gossamer runtime.Memory interface type Memory struct { - memory *wasmgo.Memory + memory *wasmer.Memory } func checkBounds(value uint64) (uint32, error) { @@ -45,9 +45,9 @@ func (m Memory) Length() uint32 { // Grow grows the memory by the given number of pages func (m Memory) Grow(numPages uint32) error { - ok := m.memory.Grow(wasmgo.Pages(numPages)) + ok := m.memory.Grow(wasmer.Pages(numPages)) if !ok { - return fmt.Errorf("%w", errCantGrowMemory) + return fmt.Errorf("%w: by %d pages", errCantGrowMemory, numPages) } return nil } diff --git a/lib/runtime/newWasmer/memory_test.go b/lib/runtime/newWasmer/memory_test.go index 6907f1a13a..6e3bfe94ec 100644 --- a/lib/runtime/newWasmer/memory_test.go +++ b/lib/runtime/newWasmer/memory_test.go @@ -1,14 +1,14 @@ // Copyright 2023 ChainSafe Systems (ON) // SPDX-License-Identifier: LGPL-3.0-only -package wasmer +package latestwasmer import ( - "github.com/stretchr/testify/assert" "math" "testing" "unsafe" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/wasmerio/wasmer-go/wasmer" )