Skip to content

Commit eb8b52a

Browse files
authored
Remove zstd Cortina check (#1459)
1 parent 850c6fd commit eb8b52a

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

config/config.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import (
4949
"github.com/ava-labs/avalanchego/utils/set"
5050
"github.com/ava-labs/avalanchego/utils/storage"
5151
"github.com/ava-labs/avalanchego/utils/timer"
52-
"github.com/ava-labs/avalanchego/version"
5352
"github.com/ava-labs/avalanchego/vms/platformvm/reward"
5453
"github.com/ava-labs/avalanchego/vms/proposervm"
5554
)
@@ -84,7 +83,6 @@ var (
8483
errMissingStakingSigningKeyFile = errors.New("missing staking signing key file")
8584
errTracingEndpointEmpty = fmt.Errorf("%s cannot be empty", TracingEndpointKey)
8685
errPluginDirNotADirectory = errors.New("plugin dir is not a directory")
87-
errZstdNotSupported = errors.New("zstd compression not supported until v1.10")
8886
errCannotReadDirectory = errors.New("cannot read directory")
8987
errUnmarshalling = errors.New("unmarshalling failed")
9088
errFileDoesNotExist = errors.New("file does not exist")
@@ -309,7 +307,6 @@ func getNetworkConfig(
309307
v *viper.Viper,
310308
stakingEnabled bool,
311309
halflife time.Duration,
312-
networkID uint32, // TODO remove after cortina upgrade
313310
) (network.Config, error) {
314311
// Set the max number of recent inbound connections upgraded to be
315312
// equal to the max number of inbound connections per second.
@@ -339,13 +336,7 @@ func getNetworkConfig(
339336
}
340337
}
341338

342-
cortinaTime := version.GetCortinaTime(networkID)
343-
if compressionType == compression.TypeZstd && !time.Now().After(cortinaTime) {
344-
// TODO remove after cortina upgrade
345-
return network.Config{}, errZstdNotSupported
346-
}
347339
config := network.Config{
348-
// Throttling
349340
ThrottlerConfig: network.ThrottlerConfig{
350341
MaxInboundConnsPerSec: maxInboundConnsPerSec,
351342
InboundConnUpgradeThrottlerConfig: throttling.InboundConnUpgradeThrottlerConfig{
@@ -1386,7 +1377,7 @@ func GetNodeConfig(v *viper.Viper) (node.Config, error) {
13861377
}
13871378

13881379
// Network Config
1389-
nodeConfig.NetworkConfig, err = getNetworkConfig(v, nodeConfig.EnableStaking, healthCheckAveragerHalflife, nodeConfig.NetworkID)
1380+
nodeConfig.NetworkConfig, err = getNetworkConfig(v, nodeConfig.EnableStaking, healthCheckAveragerHalflife)
13901381
if err != nil {
13911382
return node.Config{}, err
13921383
}

0 commit comments

Comments
 (0)