add support for v12 check invariants and also a default case to reduce future confusion (#11371)
This commit is contained in:
parent
bbe28536d4
commit
290f35a24f
@ -16,6 +16,7 @@ import (
|
||||
"github.com/filecoin-project/go-state-types/builtin"
|
||||
v10 "github.com/filecoin-project/go-state-types/builtin/v10"
|
||||
v11 "github.com/filecoin-project/go-state-types/builtin/v11"
|
||||
v12 "github.com/filecoin-project/go-state-types/builtin/v12"
|
||||
v8 "github.com/filecoin-project/go-state-types/builtin/v8"
|
||||
v9 "github.com/filecoin-project/go-state-types/builtin/v9"
|
||||
|
||||
@ -149,6 +150,13 @@ var invariantsCmd = &cli.Command{
|
||||
if err != nil {
|
||||
return xerrors.Errorf("checking state invariants: %w", err)
|
||||
}
|
||||
case actorstypes.Version12:
|
||||
messages, err = v12.CheckStateInvariants(actorTree, abi.ChainEpoch(epoch), actorCodeCids)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("checking state invariants: %w", err)
|
||||
}
|
||||
default:
|
||||
return xerrors.Errorf("unsupported actor version: %v", av)
|
||||
}
|
||||
|
||||
fmt.Println("completed, took ", time.Since(startTime))
|
||||
|
Loading…
Reference in New Issue
Block a user