deploy the chaos actor.

This commit is contained in:
Raúl Kripalani 2020-08-19 14:31:34 +01:00
parent 4f4cebadc7
commit a21234cd54
2 changed files with 7 additions and 3 deletions

View File

@ -5,12 +5,15 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/puppet" "github.com/filecoin-project/specs-actors/actors/puppet"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/filecoin-project/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/lib/blockstore" "github.com/filecoin-project/lotus/lib/blockstore"
"github.com/filecoin-project/sector-storage/ffiwrapper" "github.com/filecoin-project/test-vectors/chaos"
) )
var ( var (
@ -44,9 +47,10 @@ func (d *Driver) ExecuteMessage(msg *types.Message, preroot cid.Cid, bs blocksto
return nil, cid.Undef, err return nil, cid.Undef, err
} }
// add support for the puppet actor. // add support for the puppet and chaos actors.
invoker := vm.NewInvoker() invoker := vm.NewInvoker()
invoker.Register(puppet.PuppetActorCodeID, puppet.Actor{}, puppet.State{}) invoker.Register(puppet.PuppetActorCodeID, puppet.Actor{}, puppet.State{})
invoker.Register(chaos.ChaosActorCodeCID, chaos.Actor{}, chaos.State{})
lvm.SetInvoker(invoker) lvm.SetInvoker(invoker)
ret, err := lvm.ApplyMessage(d.ctx, msg) ret, err := lvm.ApplyMessage(d.ctx, msg)

2
extern/test-vectors vendored

@ -1 +1 @@
Subproject commit 6da40aea2981f87efec5bde76de95b68c1c21bf6 Subproject commit 9aec197823427e302533f85df4c28dd4cc42dc36