diff --git a/node/node.go b/node/node.go index 16f32ea0facb..40eb8dc16bef 100644 --- a/node/node.go +++ b/node/node.go @@ -1084,7 +1084,7 @@ func (n *Node) initVMs() error { ApricotPhase5Time: version.GetApricotPhase5Time(n.Config.NetworkID), BanffTime: version.GetBanffTime(n.Config.NetworkID), CortinaTime: version.GetCortinaTime(n.Config.NetworkID), - DTime: version.GetDTime(n.Config.NetworkID), + DurangoTime: version.GetDurangoTime(n.Config.NetworkID), UseCurrentHeight: n.Config.UseCurrentHeight, }, }), diff --git a/version/constants.go b/version/constants.go index 5d57933e424b..a9bc3d2a6f91 100644 --- a/version/constants.go +++ b/version/constants.go @@ -99,7 +99,7 @@ var ( CortinaXChainStopVertexID map[uint32]ids.ID // TODO: update this before release - DTimes = map[uint32]time.Time{ + DurangoTimes = map[uint32]time.Time{ constants.MainnetID: time.Date(10000, time.December, 1, 0, 0, 0, 0, time.UTC), constants.FujiID: time.Date(10000, time.December, 1, 0, 0, 0, 0, time.UTC), } @@ -191,8 +191,8 @@ func GetCortinaTime(networkID uint32) time.Time { return DefaultUpgradeTime } -func GetDTime(networkID uint32) time.Time { - if upgradeTime, exists := DTimes[networkID]; exists { +func GetDurangoTime(networkID uint32) time.Time { + if upgradeTime, exists := DurangoTimes[networkID]; exists { return upgradeTime } return DefaultUpgradeTime diff --git a/vms/platformvm/config/config.go b/vms/platformvm/config/config.go index 05068e46a69d..f9504708f78a 100644 --- a/vms/platformvm/config/config.go +++ b/vms/platformvm/config/config.go @@ -104,8 +104,8 @@ type Config struct { // Time of the Cortina network upgrade CortinaTime time.Time - // Time of the D network upgrade - DTime time.Time + // Time of the Durango network upgrade + DurangoTime time.Time // UseCurrentHeight forces [GetMinimumHeight] to return the current height // of the P-Chain instead of the oldest block in the [recentlyAccepted] @@ -133,9 +133,8 @@ func (c *Config) IsCortinaActivated(timestamp time.Time) bool { return !timestamp.Before(c.CortinaTime) } -// TODO: Rename -func (c *Config) IsDActivated(timestamp time.Time) bool { - return !timestamp.Before(c.DTime) +func (c *Config) IsDurangoActivated(timestamp time.Time) bool { + return !timestamp.Before(c.DurangoTime) } func (c *Config) GetCreateBlockchainTxFee(timestamp time.Time) uint64 { diff --git a/vms/platformvm/txs/executor/staker_tx_verification.go b/vms/platformvm/txs/executor/staker_tx_verification.go index 9ec4880e4a44..7fae0e78a85b 100644 --- a/vms/platformvm/txs/executor/staker_tx_verification.go +++ b/vms/platformvm/txs/executor/staker_tx_verification.go @@ -37,7 +37,7 @@ var ( ErrDuplicateValidator = errors.New("duplicate validator") ErrDelegateToPermissionedValidator = errors.New("delegation to permissioned validator") ErrWrongStakedAssetID = errors.New("incorrect staked assetID") - ErrDUpgradeNotActive = errors.New("attempting to use a D-upgrade feature prior to activation") + ErrDurangoUpgradeNotActive = errors.New("attempting to use a Durango-upgrade feature prior to activation") ) // verifySubnetValidatorPrimaryNetworkRequirements verifies the primary @@ -727,8 +727,8 @@ func verifyTransferSubnetOwnershipTx( sTx *txs.Tx, tx *txs.TransferSubnetOwnershipTx, ) error { - if !backend.Config.IsDActivated(chainState.GetTimestamp()) { - return ErrDUpgradeNotActive + if !backend.Config.IsDurangoActivated(chainState.GetTimestamp()) { + return ErrDurangoUpgradeNotActive } // Verify the tx is well-formed diff --git a/vms/platformvm/txs/executor/standard_tx_executor.go b/vms/platformvm/txs/executor/standard_tx_executor.go index 22bab59afd3b..63069cb5d5d5 100644 --- a/vms/platformvm/txs/executor/standard_tx_executor.go +++ b/vms/platformvm/txs/executor/standard_tx_executor.go @@ -516,8 +516,8 @@ func (e *StandardTxExecutor) TransferSubnetOwnershipTx(tx *txs.TransferSubnetOwn } func (e *StandardTxExecutor) BaseTx(tx *txs.BaseTx) error { - if !e.Backend.Config.IsDActivated(e.State.GetTimestamp()) { - return ErrDUpgradeNotActive + if !e.Backend.Config.IsDurangoActivated(e.State.GetTimestamp()) { + return ErrDurangoUpgradeNotActive } // Verify the tx is well-formed