@@ -11,8 +11,7 @@ import (
11
11
"github.com/tendermint/tendermint/light"
12
12
core "github.com/tendermint/tendermint/types"
13
13
14
- v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1"
15
- v2 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v2"
14
+ "github.com/celestiaorg/celestia-app/v2/pkg/appconsts"
16
15
"github.com/celestiaorg/celestia-app/v2/pkg/da"
17
16
libhead "github.com/celestiaorg/go-header"
18
17
"github.com/celestiaorg/rsmt2d"
@@ -115,13 +114,10 @@ func (eh *ExtendedHeader) Validate() error {
115
114
return fmt .Errorf ("ValidateBasic error on RawHeader at height %d: %w" , eh .Height (), err )
116
115
}
117
116
118
- if eh .RawHeader .Version .App != v1 .Version && eh .RawHeader .Version .App != v2 .Version {
119
- return fmt .Errorf (
120
- "app version mismatch, expected: %d or %d, got %d" ,
121
- v1 .Version ,
122
- v2 .Version ,
123
- eh .RawHeader .Version .App ,
124
- )
117
+ if eh .RawHeader .Version .App == 0 || eh .RawHeader .Version .App > appconsts .LatestVersion {
118
+ return fmt .Errorf ("header received at height %d has version %d, this node supports up " +
119
+ "to version %d. Please upgrade to support new version. Note, 0 is not a valid version" ,
120
+ eh .RawHeader .Height , eh .RawHeader .Version .App , appconsts .LatestVersion )
125
121
}
126
122
127
123
err = eh .Commit .ValidateBasic ()
0 commit comments