From fefd851569d4dad5d3ff0efeb8056c2779e152f9 Mon Sep 17 00:00:00 2001 From: Mikers Date: Tue, 31 Oct 2023 13:39:03 -1000 Subject: [PATCH] add support for v12 check invariants and also a default case to reduce future confusion --- cmd/lotus-shed/invariants.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/lotus-shed/invariants.go b/cmd/lotus-shed/invariants.go index 51d746f79d0..e74a0dd24c2 100644 --- a/cmd/lotus-shed/invariants.go +++ b/cmd/lotus-shed/invariants.go @@ -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))