Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app/version: v1.0-dev #3077

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions app/peerinfo/peerinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,28 @@ 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...)
}
KaloyanTanev marked this conversation as resolved.
Show resolved Hide resolved

nodes := []struct {
Version version.SemVer
LockHash []byte
Offset time.Duration
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,
},
Expand Down
6 changes: 2 additions & 4 deletions app/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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},
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Loading