diff --git a/chain/actors/builtin/market/actor.go.template b/chain/actors/builtin/market/actor.go.template index a96c62e43..66298a18a 100644 --- a/chain/actors/builtin/market/actor.go.template +++ b/chain/actors/builtin/market/actor.go.template @@ -185,6 +185,10 @@ func GetDealFees(deal market{{.latestVersion}}.DealProposal, height abi.ChainEpo return ef, big.Sub(tf, ef) } +func IsDealActive(state market{{.latestVersion}}.DealState) bool { + return state.SectorStartEpoch > -1 && state.SlashEpoch == -1 +} + func labelFromGoString(s string) (market{{.latestVersion}}.DealLabel, error) { if utf8.ValidString(s) { return market{{.latestVersion}}.NewLabelFromString(s)