filecoin-project / specs-actors

DEPRECATED Specification of builtin actors, in the form of executable code.
Other
86 stars 102 forks source link

fix: Use the can-proof-type funcs from the go-state-types package #1602

Closed diwufeiwen closed 1 year ago

diwufeiwen commented 1 year ago

The custom proof-types of venus/lotus are registered to go-state-types, so the functions defined in go-state-types should also be used here: lotus/chain/actors/policy/policy.go

import(
     miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner"
)

func AddSupportedProofTypes(types ...abi.RegisteredSealProof) {
    for _, t := range types {
        // other ...

        miner8.PreCommitSealProofTypesV8[t+abi.RegisteredSealProof_StackedDrg2KiBV1_1] = struct{}{}
        wpp, err = t.RegisteredWindowPoStProof()
        if err != nil {
            // Fine to panic, this is a test-only method
            panic(err)
        }

        miner8.WindowPoStProofTypes[wpp] = struct{}{}

    }
}
ZenGround0 commented 1 year ago

Deprecating repo