Files
zeekay 609ab12a44 Initial release: extract upgrade package from node
- Config struct with network upgrade times for Mainnet, Testnet, Default
- Validation methods for all upgrade phases (Apricot through Granite)
- GetConfig(networkID) to get appropriate config for network
- upgradetest/ subpackage with Fork enum and test helpers
- Inline MainnetID/TestnetID constants to avoid circular deps

Tests: PASS
2025-12-04 08:09:33 -08:00

28 lines
659 B
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package upgradetest
import (
"time"
"github.com/luxfi/upgrade"
)
// TestConfig returns a test upgrade configuration
func TestConfig() map[string]time.Time {
return map[string]time.Time{
"testUpgrade": time.Now().Add(time.Hour),
}
}
// LatestVersion represents the latest upgrade configuration for testing
const LatestVersion = "latest"
// GetConfigForVersion returns an upgrade configuration for testing
func GetConfigForVersion(version string) upgrade.Config {
return upgrade.Config{
GraniteTime: time.Now().Add(time.Hour),
}
}