diff --git a/app/peerinfo/peerinfo_test.go b/app/peerinfo/peerinfo_test.go index 3db32bd60..1210fcb8e 100644 --- a/app/peerinfo/peerinfo_test.go +++ b/app/peerinfo/peerinfo_test.go @@ -23,6 +23,12 @@ func TestPeerInfo(t *testing.T) { now := time.Now() const gitCommit = "1234567" + // when a major release happens, charon will only be compatible with a single version + versions := version.Supported() + if len(versions) < 2 { + versions = append(versions, versions...) + } + nodes := []struct { Version version.SemVer LockHash []byte @@ -30,15 +36,15 @@ func TestPeerInfo(t *testing.T) { Ignore bool }{ { - Version: version.Supported()[0], + Version: versions[0], LockHash: []byte("abcdef"), }, { - Version: version.Supported()[0], + Version: versions[0], LockHash: []byte("abcdef"), }, { - Version: version.Supported()[1], + Version: versions[1], LockHash: []byte("000000"), Offset: time.Minute, }, diff --git a/app/version/version.go b/app/version/version.go index ebe21f0a0..8004579c8 100644 --- a/app/version/version.go +++ b/app/version/version.go @@ -15,7 +15,7 @@ import ( ) // version a string since it is overwritten at build-time with the git tag for official releases. -var version = "v0.20-dev" +var version = "v1.0-dev" // Version is the branch version of the codebase. // - Main branch: v0.X-dev @@ -25,9 +25,7 @@ var Version, _ = Parse(version) // Error is caught in tests. // Supported returns the supported minor versions in order of precedence. func Supported() []SemVer { return []SemVer{ - // Current minor version always goes first. - {major: 0, minor: 20}, - {major: 0, minor: 19}, + {major: 1, minor: 0}, } } diff --git a/app/version/version_test.go b/app/version/version_test.go index 614dbf209..e95a5a693 100644 --- a/app/version/version_test.go +++ b/app/version/version_test.go @@ -85,5 +85,5 @@ func TestSupportedAreminors(t *testing.T) { } func TestMultiSupported(t *testing.T) { - require.True(t, len(version.Supported()) > 1) + require.GreaterOrEqual(t, len(version.Supported()), 1) }