24 lines
410 B
Go
24 lines
410 B
Go
|
package builtin
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/filecoin-project/go-state-types/network"
|
||
|
)
|
||
|
|
||
|
type Version int
|
||
|
|
||
|
const (
|
||
|
Version0 = iota
|
||
|
)
|
||
|
|
||
|
// Converts a network version into a specs-actors version.
|
||
|
func VersionForNetwork(version network.Version) Version {
|
||
|
switch version {
|
||
|
case network.Version0, network.Version1:
|
||
|
return Version
|
||
|
default:
|
||
|
panic(fmt.Sprintf("unsupported network version %d", version))
|
||
|
}
|
||
|
}
|