Skip to content

Commit

Permalink
add support for v12 check invariants and also a default case to reduc…
Browse files Browse the repository at this point in the history
…e future confusion (#11371)
  • Loading branch information
snissn authored Nov 1, 2023
1 parent 77b6b7e commit 72c5a9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/lotus-shed/invariants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 72c5a9a

Please sign in to comment.