Use latest version if no upgrade height is specified

This commit is contained in:
Aayush Rajasekaran 2020-09-07 17:43:14 -04:00
parent 6eea5dd109
commit 45011c0fad
3 changed files with 7 additions and 3 deletions

View File

@ -407,7 +407,7 @@ func VerifyPreSealedData(ctx context.Context, cs *store.ChainStore, stateroot ci
var sum abi.PaddedPieceSize
nwv := func(context.Context, abi.ChainEpoch) runtime.NetworkVersion {
return runtime.NetworkVersion0
return runtime.NetworkVersion1
}
vmopt := vm.VMOpts{

View File

@ -62,7 +62,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid
}
nwv := func(context.Context, abi.ChainEpoch) runtime.NetworkVersion {
return runtime.NetworkVersion0
return runtime.NetworkVersion1
}
vmopt := &vm.VMOpts{

View File

@ -1125,7 +1125,11 @@ func (sm *StateManager) GetCirculatingSupply(ctx context.Context, height abi.Cha
}
func (sm *StateManager) GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) runtime.NetworkVersion {
if build.UpgradeBreezeHeight == 0 || height <= build.UpgradeBreezeHeight {
if build.UpgradeBreezeHeight == 0 {
return runtime.NetworkVersion1
}
if height <= build.UpgradeBreezeHeight {
return runtime.NetworkVersion0
}