From 221783498b37379747906a43cb42492868893eb6 Mon Sep 17 00:00:00 2001 From: IronGauntlets Date: Mon, 25 Nov 2024 15:20:48 +0000 Subject: [PATCH] Remove use of unnecessary variable --- blockchain/blockchain_test.go | 9 +++------ go.sum | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/blockchain/blockchain_test.go b/blockchain/blockchain_test.go index b53e9afce..4c217c3ba 100644 --- a/blockchain/blockchain_test.go +++ b/blockchain/blockchain_test.go @@ -156,20 +156,17 @@ func TestVerifyBlock(t *testing.T) { }) t.Run("mismatch at patch version is ignored", func(t *testing.T) { - ver := blockchain.SupportedStarknetVersion - mainnetBlock0.ProtocolVersion = ver.IncPatch().String() + mainnetBlock0.ProtocolVersion = blockchain.SupportedStarknetVersion.IncPatch().String() assert.NoError(t, chain.VerifyBlock(mainnetBlock0)) }) t.Run("error if mismatch at minor version", func(t *testing.T) { - ver := blockchain.SupportedStarknetVersion - mainnetBlock0.ProtocolVersion = ver.IncMinor().String() + mainnetBlock0.ProtocolVersion = blockchain.SupportedStarknetVersion.IncMinor().String() assert.EqualError(t, chain.VerifyBlock(mainnetBlock0), "unsupported block version") }) t.Run("error if mismatch at minor version", func(t *testing.T) { - ver := blockchain.SupportedStarknetVersion - mainnetBlock0.ProtocolVersion = ver.IncMajor().String() + mainnetBlock0.ProtocolVersion = blockchain.SupportedStarknetVersion.IncMajor().String() assert.EqualError(t, chain.VerifyBlock(mainnetBlock0), "unsupported block version") }) diff --git a/go.sum b/go.sum index 831d21c5f..1f19c8942 100644 --- a/go.sum +++ b/go.sum @@ -415,6 +415,7 @@ github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeD github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/pascaldekloe/name v1.0.0 h1:n7LKFgHixETzxpRv2R77YgPUFo85QHGZKrdaYm7eY5U= github.com/pascaldekloe/name v1.0.0/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM=