mirror of
https://github.com/luxfi/upgrade.git
synced 2026-10-30 15:14:01 +00:00
- 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
28 lines
659 B
Go
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),
|
|
}
|
|
}
|