Merge pull request #9876 from filecoin-project/gstuart/update-gst
chore: Update go-state-types
This commit is contained in:
commit
bc22bb1b89
@ -24,7 +24,7 @@ var (
|
|||||||
|
|
||||||
func Load(store adt.Store, act *types.Actor) (State, error) {
|
func Load(store adt.Store, act *types.Actor) (State, error) {
|
||||||
if name, av, ok := actors.GetActorMetaByCode(act.Code); ok {
|
if name, av, ok := actors.GetActorMetaByCode(act.Code); ok {
|
||||||
if name != manifest.DataCapKey {
|
if name != manifest.DatacapKey {
|
||||||
return nil, xerrors.Errorf("actor code is not datacap: %s", name)
|
return nil, xerrors.Errorf("actor code is not datacap: %s", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ var (
|
|||||||
|
|
||||||
func Load(store adt.Store, act *types.Actor) (State, error) {
|
func Load(store adt.Store, act *types.Actor) (State, error) {
|
||||||
if name, av, ok := actors.GetActorMetaByCode(act.Code); ok {
|
if name, av, ok := actors.GetActorMetaByCode(act.Code); ok {
|
||||||
if name != manifest.DataCapKey {
|
if name != manifest.DatacapKey {
|
||||||
return nil, xerrors.Errorf("actor code is not datacap: %s", name)
|
return nil, xerrors.Errorf("actor code is not datacap: %s", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ func (s *state{{.v}}) VerifiedClientDataCap(addr address.Address) (bool, abi.Sto
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *state{{.v}}) ActorKey() string {
|
func (s *state{{.v}}) ActorKey() string {
|
||||||
return manifest.DataCapKey
|
return manifest.DatacapKey
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *state{{.v}}) ActorVersion() actorstypes.Version {
|
func (s *state{{.v}}) ActorVersion() actorstypes.Version {
|
||||||
|
2
chain/actors/builtin/datacap/v10.go
generated
2
chain/actors/builtin/datacap/v10.go
generated
@ -65,7 +65,7 @@ func (s *state10) VerifiedClientDataCap(addr address.Address) (bool, abi.Storage
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *state10) ActorKey() string {
|
func (s *state10) ActorKey() string {
|
||||||
return manifest.DataCapKey
|
return manifest.DatacapKey
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *state10) ActorVersion() actorstypes.Version {
|
func (s *state10) ActorVersion() actorstypes.Version {
|
||||||
|
2
chain/actors/builtin/datacap/v9.go
generated
2
chain/actors/builtin/datacap/v9.go
generated
@ -65,7 +65,7 @@ func (s *state9) VerifiedClientDataCap(addr address.Address) (bool, abi.StorageP
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *state9) ActorKey() string {
|
func (s *state9) ActorKey() string {
|
||||||
return manifest.DataCapKey
|
return manifest.DatacapKey
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *state9) ActorVersion() actorstypes.Version {
|
func (s *state9) ActorVersion() actorstypes.Version {
|
||||||
|
@ -259,7 +259,7 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
|
|||||||
methods: verifreg9.Methods,
|
methods: verifreg9.Methods,
|
||||||
state: new(verifreg9.State),
|
state: new(verifreg9.State),
|
||||||
})
|
})
|
||||||
case manifest.DataCapKey:
|
case manifest.DatacapKey:
|
||||||
registry = append(registry, RegistryEntry{
|
registry = append(registry, RegistryEntry{
|
||||||
code: codeID,
|
code: codeID,
|
||||||
methods: datacap9.Methods,
|
methods: datacap9.Methods,
|
||||||
@ -337,7 +337,7 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
|
|||||||
methods: verifreg10.Methods,
|
methods: verifreg10.Methods,
|
||||||
state: new(verifreg10.State),
|
state: new(verifreg10.State),
|
||||||
})
|
})
|
||||||
case manifest.DataCapKey:
|
case manifest.DatacapKey:
|
||||||
registry = append(registry, RegistryEntry{
|
registry = append(registry, RegistryEntry{
|
||||||
code: codeID,
|
code: codeID,
|
||||||
methods: datacap10.Methods,
|
methods: datacap10.Methods,
|
||||||
|
@ -168,7 +168,7 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
|
|||||||
methods: verifreg{{.}}.Methods,
|
methods: verifreg{{.}}.Methods,
|
||||||
state: new(verifreg{{.}}.State),
|
state: new(verifreg{{.}}.State),
|
||||||
})
|
})
|
||||||
{{if (ge . 9)}}case manifest.DataCapKey:
|
{{if (ge . 9)}}case manifest.DatacapKey:
|
||||||
registry = append(registry, RegistryEntry{
|
registry = append(registry, RegistryEntry{
|
||||||
code: codeID,
|
code: codeID,
|
||||||
methods: datacap{{.}}.Methods,
|
methods: datacap{{.}}.Methods,
|
||||||
|
@ -42,7 +42,7 @@ func SetupDatacapActor(ctx context.Context, bs bstore.Blockstore, av actorstypes
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
actcid, ok := actors.GetActorCodeID(av, manifest.DataCapKey)
|
actcid, ok := actors.GetActorCodeID(av, manifest.DatacapKey)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, xerrors.Errorf("failed to get datacap actor code ID for actors version %d", av)
|
return nil, xerrors.Errorf("failed to get datacap actor code ID for actors version %d", av)
|
||||||
}
|
}
|
||||||
|
@ -1133,7 +1133,7 @@ var actorConfirmChangeWorker = &cli.Command{
|
|||||||
smsg, err := api.MpoolPushMessage(ctx, &types.Message{
|
smsg, err := api.MpoolPushMessage(ctx, &types.Message{
|
||||||
From: mi.Owner,
|
From: mi.Owner,
|
||||||
To: maddr,
|
To: maddr,
|
||||||
Method: builtin.MethodsMiner.ConfirmUpdateWorkerKey,
|
Method: builtin.MethodsMiner.ConfirmChangeWorkerAddress,
|
||||||
Value: big.Zero(),
|
Value: big.Zero(),
|
||||||
}, nil)
|
}, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -778,7 +778,7 @@ var actorConfirmChangeWorker = &cli.Command{
|
|||||||
smsg, err := nodeAPI.MpoolPushMessage(ctx, &types.Message{
|
smsg, err := nodeAPI.MpoolPushMessage(ctx, &types.Message{
|
||||||
From: mi.Owner,
|
From: mi.Owner,
|
||||||
To: maddr,
|
To: maddr,
|
||||||
Method: builtin.MethodsMiner.ConfirmUpdateWorkerKey,
|
Method: builtin.MethodsMiner.ConfirmChangeWorkerAddress,
|
||||||
Value: big.Zero(),
|
Value: big.Zero(),
|
||||||
}, nil)
|
}, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -821,7 +821,7 @@ var actorGetMethodNum = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
methodName := cctx.Args().First()
|
methodName := cctx.Args().First()
|
||||||
methodNum, err := builtin.GenerateMethodNum(methodName)
|
methodNum, err := builtin.GenerateFRCMethodNum(methodName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -627,7 +627,7 @@ var mmConfirmChangeWorker = &cli.Command{
|
|||||||
return xerrors.Errorf("worker key change cannot be confirmed until %d, current height is %d", mi.WorkerChangeEpoch, head.Height())
|
return xerrors.Errorf("worker key change cannot be confirmed until %d, current height is %d", mi.WorkerChangeEpoch, head.Height())
|
||||||
}
|
}
|
||||||
|
|
||||||
pcid, err := api.MsigPropose(ctx, multisigAddr, minerAddr, big.Zero(), sender, uint64(builtin.MethodsMiner.ConfirmUpdateWorkerKey), nil)
|
pcid, err := api.MsigPropose(ctx, multisigAddr, minerAddr, big.Zero(), sender, uint64(builtin.MethodsMiner.ConfirmChangeWorkerAddress), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("proposing message: %w", err)
|
return xerrors.Errorf("proposing message: %w", err)
|
||||||
}
|
}
|
||||||
|
2
go.mod
2
go.mod
@ -43,7 +43,7 @@ require (
|
|||||||
github.com/filecoin-project/go-legs v0.4.4
|
github.com/filecoin-project/go-legs v0.4.4
|
||||||
github.com/filecoin-project/go-padreader v0.0.1
|
github.com/filecoin-project/go-padreader v0.0.1
|
||||||
github.com/filecoin-project/go-paramfetch v0.0.4
|
github.com/filecoin-project/go-paramfetch v0.0.4
|
||||||
github.com/filecoin-project/go-state-types v0.10.0-alpha-4
|
github.com/filecoin-project/go-state-types v0.10.0-alpha-5
|
||||||
github.com/filecoin-project/go-statemachine v1.0.2
|
github.com/filecoin-project/go-statemachine v1.0.2
|
||||||
github.com/filecoin-project/go-statestore v0.2.0
|
github.com/filecoin-project/go-statestore v0.2.0
|
||||||
github.com/filecoin-project/go-storedcounter v0.1.0
|
github.com/filecoin-project/go-storedcounter v0.1.0
|
||||||
|
4
go.sum
4
go.sum
@ -356,8 +356,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS
|
|||||||
github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
||||||
github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
||||||
github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
|
||||||
github.com/filecoin-project/go-state-types v0.10.0-alpha-4 h1:qFuw0C+ShmpyRTpJIYAB+u11F6fYqI/4vU138EFc3ps=
|
github.com/filecoin-project/go-state-types v0.10.0-alpha-5 h1:k5yLpgqTns8OFjPwMWfDCmSDd+BqpFhsQEQKIquM3cM=
|
||||||
github.com/filecoin-project/go-state-types v0.10.0-alpha-4/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI=
|
github.com/filecoin-project/go-state-types v0.10.0-alpha-5/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI=
|
||||||
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
|
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
|
||||||
github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc=
|
github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc=
|
||||||
github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=
|
github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=
|
||||||
|
Loading…
Reference in New Issue
Block a user