decomplect: rip NetworkUpgrades interface (14 always-true predicates) from Runtime + VMContext

This commit is contained in:
Hanzo AI
2026-05-21 10:36:52 -07:00
parent 81f30e0d6e
commit 501141d875
-30
View File
@@ -94,9 +94,6 @@ type Runtime struct {
// Sender is the canonical warp sender
Sender warp.Sender
// NetworkUpgrades contains upgrade activation times
NetworkUpgrades NetworkUpgrades
// Lock for thread-safe access to runtime fields
Lock sync.RWMutex
}
@@ -139,25 +136,6 @@ type SharedMemory = atomic.SharedMemory
// Matches warp.Signer interface exactly.
type WarpSigner = warp.Signer
// NetworkUpgrades contains network upgrade activation times.
// Matches upgrade.Config methods exactly.
type NetworkUpgrades interface {
IsApricotPhase1Activated(timestamp time.Time) bool
IsApricotPhase2Activated(timestamp time.Time) bool
IsApricotPhase3Activated(timestamp time.Time) bool
IsApricotPhase4Activated(timestamp time.Time) bool
IsApricotPhase5Activated(timestamp time.Time) bool
IsApricotPhasePre6Activated(timestamp time.Time) bool
IsApricotPhase6Activated(timestamp time.Time) bool
IsApricotPhasePost6Activated(timestamp time.Time) bool
IsBanffActivated(timestamp time.Time) bool
IsCortinaActivated(timestamp time.Time) bool
IsDurangoActivated(timestamp time.Time) bool
IsEtnaActivated(timestamp time.Time) bool
IsFortunaActivated(timestamp time.Time) bool
IsGraniteActivated(timestamp time.Time) bool
}
// VMContext is an interface that VM contexts must implement
// This allows different context types (node, plugin, etc.) to be used interchangeably
type VMContext interface {
@@ -176,7 +154,6 @@ type VMContext interface {
GetBCLookup() BCLookup
GetWarpSigner() WarpSigner
GetSender() warp.Sender
GetNetworkUpgrades() NetworkUpgrades
}
// IDs holds the IDs for runtime context
@@ -312,13 +289,6 @@ func (r *Runtime) GetSender() warp.Sender {
return r.Sender
}
func (r *Runtime) GetNetworkUpgrades() NetworkUpgrades {
if r == nil {
return nil
}
return r.NetworkUpgrades
}
// Ensure *Runtime implements VMContext at compile time
var _ VMContext = (*Runtime)(nil)