mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
ADR-016: Add versions to Block and State (#2644)
* types: add Version to Header * abci: add Version to Header * state: add Version to State * node: check software and state protocol versions match * update changelog * docs/spec: update for versions * state: more tests * remove TODOs * remove empty test
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/version"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
@@ -242,6 +243,7 @@ func TestMaxHeaderBytes(t *testing.T) {
|
||||
}
|
||||
|
||||
h := Header{
|
||||
Version: version.Consensus{math.MaxInt64, math.MaxInt64},
|
||||
ChainID: maxChainID,
|
||||
Height: math.MaxInt64,
|
||||
Time: time.Now().UTC(),
|
||||
@@ -286,9 +288,9 @@ func TestBlockMaxDataBytes(t *testing.T) {
|
||||
}{
|
||||
0: {-10, 1, 0, true, 0},
|
||||
1: {10, 1, 0, true, 0},
|
||||
2: {721, 1, 0, true, 0},
|
||||
3: {722, 1, 0, false, 0},
|
||||
4: {723, 1, 0, false, 1},
|
||||
2: {744, 1, 0, true, 0},
|
||||
3: {745, 1, 0, false, 0},
|
||||
4: {746, 1, 0, false, 1},
|
||||
}
|
||||
|
||||
for i, tc := range testCases {
|
||||
@@ -314,9 +316,9 @@ func TestBlockMaxDataBytesUnknownEvidence(t *testing.T) {
|
||||
}{
|
||||
0: {-10, 1, true, 0},
|
||||
1: {10, 1, true, 0},
|
||||
2: {801, 1, true, 0},
|
||||
3: {802, 1, false, 0},
|
||||
4: {803, 1, false, 1},
|
||||
2: {826, 1, true, 0},
|
||||
3: {827, 1, false, 0},
|
||||
4: {828, 1, false, 1},
|
||||
}
|
||||
|
||||
for i, tc := range testCases {
|
||||
|
Reference in New Issue
Block a user