Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 44e2621

Browse files
author
Connor Daly
committed
Add compatibility tracking
1 parent be20d34 commit 44e2621

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

compatibility.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"rpcChainVMProtocolVersion": {
3+
"v0.0.11": 19,
4+
"v0.0.10": 19,
5+
"v0.0.9": 17,
6+
"v0.0.8": 16,
7+
"v0.0.7": 15,
8+
"v0.0.6": 15,
9+
"v0.0.5": 14,
10+
"v0.0.4": 12,
11+
"v0.0.3": 11,
12+
"v0.0.2": 10,
13+
"v0.0.1": 9
14+
}
15+
}

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ import "github.com/ava-labs/avalanchego/version"
99
var Version = &version.Semantic{
1010
Major: 0,
1111
Minor: 0,
12-
Patch: 10,
12+
Patch: 11,
1313
}

version/version_test.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package version
2+
3+
import (
4+
"encoding/json"
5+
"os"
6+
"testing"
7+
8+
"github.com/stretchr/testify/assert"
9+
)
10+
11+
type rpcChainCompatibility struct {
12+
RPCChainVMProtocolVersion map[string]uint `json:"rpcChainVMProtocolVersion"`
13+
}
14+
15+
const compatibilityFile = "../compatibility.json"
16+
17+
func TestCompatibility(t *testing.T) {
18+
compat, err := os.ReadFile(compatibilityFile)
19+
assert.NoError(t, err)
20+
21+
var parsedCompat rpcChainCompatibility
22+
err = json.Unmarshal(compat, &parsedCompat)
23+
assert.NoError(t, err)
24+
25+
_, valueInJSON := parsedCompat.RPCChainVMProtocolVersion[Version.String()]
26+
assert.True(t, valueInJSON)
27+
}

0 commit comments

Comments
 (0)