diff --git a/lib/runtime/version.go b/lib/runtime/version.go index 90b3bce99e..9b0f3aadd3 100644 --- a/lib/runtime/version.go +++ b/lib/runtime/version.go @@ -86,3 +86,10 @@ func DecodeVersion(encoded []byte) (version Version, err error) { legacy: true, }, nil } + +// WithLegacy sets the legacy boolean (for Kusama) +// and is only used for tests. +func (v Version) WithLegacy() Version { + v.legacy = true //skipcq: RVV-B0006 + return v +} diff --git a/lib/runtime/wasmer/exports_test.go b/lib/runtime/wasmer/exports_test.go index 9273c9498b..c2993d1f90 100644 --- a/lib/runtime/wasmer/exports_test.go +++ b/lib/runtime/wasmer/exports_test.go @@ -158,7 +158,7 @@ func Test_Instance_Version(t *testing.T) { {Name: [8]uint8{0xbc, 0x9d, 0x89, 0x90, 0x4f, 0x5b, 0x92, 0x3f}, Ver: 0x1}, {Name: [8]uint8{0x37, 0xc8, 0xbb, 0x13, 0x50, 0xa9, 0xa2, 0xa8}, Ver: 0x1}, }, - }, + }.WithLegacy(), }, "polkadot v0825": { instanceBuilder: func(t *testing.T) InstanceVersion {