Skip to content

Commit

Permalink
Remove use of unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
IronGauntlets committed Nov 25, 2024
1 parent be3c21d commit 2217834
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions blockchain/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})

Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 2217834

Please sign in to comment.