lotus/chain/actors/builtin/builtin.go

29 lines
604 B
Go
Raw Normal View History

package builtin
import (
"fmt"
"github.com/filecoin-project/go-state-types/network"
2020-09-15 23:47:58 +00:00
v0smoothing "github.com/filecoin-project/specs-actors/actors/util/smoothing"
)
type Version int
const (
Version0 = iota
)
// Converts a network version into a specs-actors version.
func VersionForNetwork(version network.Version) Version {
switch version {
2020-09-17 15:30:15 +00:00
case network.Version0, network.Version1, network.Version2:
2020-09-14 11:14:06 +00:00
return Version0
default:
panic(fmt.Sprintf("unsupported network version %d", version))
}
}
2020-09-15 23:47:58 +00:00
// TODO: find some way to abstract over this.
type FilterEstimate = v0smoothing.FilterEstimate