lotus/chain/actors/builtin/builtin.go

29 lines
1021 B
Go
Raw Normal View History

package builtin
import (
2020-09-22 04:12:07 +00:00
"github.com/filecoin-project/go-state-types/abi"
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
proof0 "github.com/filecoin-project/specs-actors/actors/runtime/proof"
2020-09-22 04:12:07 +00:00
smoothing0 "github.com/filecoin-project/specs-actors/actors/util/smoothing"
2020-09-19 03:46:03 +00:00
smoothing1 "github.com/filecoin-project/specs-actors/v2/actors/util/smoothing"
)
// TODO: Why does actors have 2 different versions of this?
type SectorInfo = proof0.SectorInfo
type PoStProof = proof0.PoStProof
type FilterEstimate = smoothing0.FilterEstimate
func FromV0FilterEstimate(v0 smoothing0.FilterEstimate) FilterEstimate {
return (FilterEstimate)(v0)
}
2020-09-22 04:12:07 +00:00
// Doesn't change between actors v0 and v1
func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower {
return miner0.QAPowerForWeight(size, duration, dealWeight, verifiedWeight)
}
2020-09-19 03:46:03 +00:00
func FromV1FilterEstimate(v1 smoothing1.FilterEstimate) FilterEstimate {
return (FilterEstimate)(v1)
}