finish wiring up actors v2

This commit is contained in:
Steven Allen 2020-09-28 15:58:07 -07:00
parent 3e6323a503
commit c0b316fd9c
3 changed files with 6 additions and 2 deletions

View File

@ -41,7 +41,7 @@ func DhtProtocolName(netName dtypes.NetworkName) protocol.ID {
func UseNewestNetwork() bool { func UseNewestNetwork() bool {
// TODO: Put these in a container we can iterate over // TODO: Put these in a container we can iterate over
if UpgradeBreezeHeight <= 0 && UpgradeSmokeHeight <= 0 { if UpgradeBreezeHeight <= 0 && UpgradeSmokeHeight <= 0 && UpgradeActorsV2 <= 0 {
return true return true
} }
return false return false

View File

@ -25,7 +25,7 @@ const UnixfsLinksPerLevel = 1024
// Consensus / Network // Consensus / Network
const AllowableClockDriftSecs = uint64(1) const AllowableClockDriftSecs = uint64(1)
const NewestNetworkVersion = network.Version3 const NewestNetworkVersion = network.Version4
const ActorUpgradeNetworkVersion = network.Version4 const ActorUpgradeNetworkVersion = network.Version4
// Epochs // Epochs

View File

@ -1275,6 +1275,10 @@ func (sm *StateManager) GetNtwkVersion(ctx context.Context, height abi.ChainEpoc
return network.Version2 return network.Version2
} }
if height <= build.UpgradeActorsV2 {
return network.Version3
}
return build.NewestNetworkVersion return build.NewestNetworkVersion
} }