Skip to content

Commit

Permalink
invoker: gen the registry
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed Jun 9, 2022
1 parent 82e4391 commit b211c51
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions chain/consensus/filcns/compute_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ import (
"context"
"sync/atomic"

/* inline-gen template
{{range .actorVersions}}
exported{{.}} "github.com/filecoin-project/specs-actors{{import .}}actors/builtin/exported"{{end}}
/* inline-gen start */

exported0 "github.com/filecoin-project/specs-actors/actors/builtin/exported"
exported2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/exported"
exported3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/exported"
exported4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/exported"
exported5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/exported"
exported6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/exported"
exported7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/exported"
exported8 "github.com/filecoin-project/specs-actors/v8/actors/builtin/exported"

/* inline-gen end */

"github.com/filecoin-project/lotus/chain/rand"

"github.com/ipfs/go-cid"
Expand All @@ -16,15 +32,6 @@ import (
"github.com/filecoin-project/go-state-types/big"
blockadt "github.com/filecoin-project/specs-actors/actors/util/adt"

exported0 "github.com/filecoin-project/specs-actors/actors/builtin/exported"
exported2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/exported"
exported3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/exported"
exported4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/exported"
exported5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/exported"
exported6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/exported"
exported7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/exported"
exported8 "github.com/filecoin-project/specs-actors/v8/actors/builtin/exported"

"github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors"
Expand All @@ -41,6 +48,13 @@ import (
func NewActorRegistry() *vm.ActorRegistry {
inv := vm.NewActorRegistry()

/* inline-gen template
{{range .actorVersions}}
inv.Register(actors.Version{{.}}, vm.ActorsVersionPredicate(actors.Version{{.}}), exported{{.}}.BuiltinActors()...){{end}}
/* inline-gen start */

inv.Register(actors.Version0, vm.ActorsVersionPredicate(actors.Version0), exported0.BuiltinActors()...)
inv.Register(actors.Version2, vm.ActorsVersionPredicate(actors.Version2), exported2.BuiltinActors()...)
inv.Register(actors.Version3, vm.ActorsVersionPredicate(actors.Version3), exported3.BuiltinActors()...)
Expand All @@ -50,6 +64,8 @@ func NewActorRegistry() *vm.ActorRegistry {
inv.Register(actors.Version7, vm.ActorsVersionPredicate(actors.Version7), exported7.BuiltinActors()...)
inv.Register(actors.Version8, vm.ActorsVersionPredicate(actors.Version8), exported8.BuiltinActors()...)

/* inline-gen end */

return inv
}

Expand Down

0 comments on commit b211c51

Please sign in to comment.