Update go-state-types

This commit is contained in:
Geoff Stuart 2022-12-14 19:02:43 -05:00
parent a264893543
commit d615b1c806
13 changed files with 16 additions and 16 deletions

View File

@ -24,7 +24,7 @@ var (
func Load(store adt.Store, act *types.Actor) (State, error) {
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)
}

View File

@ -23,7 +23,7 @@ var (
func Load(store adt.Store, act *types.Actor) (State, error) {
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)
}

View File

@ -64,7 +64,7 @@ func (s *state{{.v}}) VerifiedClientDataCap(addr address.Address) (bool, abi.Sto
}
func (s *state{{.v}}) ActorKey() string {
return manifest.DataCapKey
return manifest.DatacapKey
}
func (s *state{{.v}}) ActorVersion() actorstypes.Version {

View File

@ -65,7 +65,7 @@ func (s *state10) VerifiedClientDataCap(addr address.Address) (bool, abi.Storage
}
func (s *state10) ActorKey() string {
return manifest.DataCapKey
return manifest.DatacapKey
}
func (s *state10) ActorVersion() actorstypes.Version {

View File

@ -65,7 +65,7 @@ func (s *state9) VerifiedClientDataCap(addr address.Address) (bool, abi.StorageP
}
func (s *state9) ActorKey() string {
return manifest.DataCapKey
return manifest.DatacapKey
}
func (s *state9) ActorVersion() actorstypes.Version {

View File

@ -259,7 +259,7 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
methods: verifreg9.Methods,
state: new(verifreg9.State),
})
case manifest.DataCapKey:
case manifest.DatacapKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: datacap9.Methods,
@ -337,7 +337,7 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
methods: verifreg10.Methods,
state: new(verifreg10.State),
})
case manifest.DataCapKey:
case manifest.DatacapKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: datacap10.Methods,

View File

@ -168,7 +168,7 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry {
methods: verifreg{{.}}.Methods,
state: new(verifreg{{.}}.State),
})
{{if (ge . 9)}}case manifest.DataCapKey:
{{if (ge . 9)}}case manifest.DatacapKey:
registry = append(registry, RegistryEntry{
code: codeID,
methods: datacap{{.}}.Methods,

View File

@ -42,7 +42,7 @@ func SetupDatacapActor(ctx context.Context, bs bstore.Blockstore, av actorstypes
return nil, err
}
actcid, ok := actors.GetActorCodeID(av, manifest.DataCapKey)
actcid, ok := actors.GetActorCodeID(av, manifest.DatacapKey)
if !ok {
return nil, xerrors.Errorf("failed to get datacap actor code ID for actors version %d", av)
}

View File

@ -1133,7 +1133,7 @@ var actorConfirmChangeWorker = &cli.Command{
smsg, err := api.MpoolPushMessage(ctx, &types.Message{
From: mi.Owner,
To: maddr,
Method: builtin.MethodsMiner.ConfirmUpdateWorkerKey,
Method: builtin.MethodsMiner.ConfirmChangeWorkerAddress,
Value: big.Zero(),
}, nil)
if err != nil {

View File

@ -778,7 +778,7 @@ var actorConfirmChangeWorker = &cli.Command{
smsg, err := nodeAPI.MpoolPushMessage(ctx, &types.Message{
From: mi.Owner,
To: maddr,
Method: builtin.MethodsMiner.ConfirmUpdateWorkerKey,
Method: builtin.MethodsMiner.ConfirmChangeWorkerAddress,
Value: big.Zero(),
}, nil)
if err != nil {
@ -821,7 +821,7 @@ var actorGetMethodNum = &cli.Command{
}
methodName := cctx.Args().First()
methodNum, err := builtin.GenerateMethodNum(methodName)
methodNum, err := builtin.GenerateFRCMethodNum(methodName)
if err != nil {
return err
}

View File

@ -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())
}
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 {
return xerrors.Errorf("proposing message: %w", err)
}

2
go.mod
View File

@ -43,7 +43,7 @@ require (
github.com/filecoin-project/go-legs v0.4.4
github.com/filecoin-project/go-padreader v0.0.1
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-statestore v0.2.0
github.com/filecoin-project/go-storedcounter v0.1.0

4
go.sum
View File

@ -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.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.10.0-alpha-4 h1:qFuw0C+ShmpyRTpJIYAB+u11F6fYqI/4vU138EFc3ps=
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 h1:k5yLpgqTns8OFjPwMWfDCmSDd+BqpFhsQEQKIquM3cM=
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 v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc=
github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=