move actor key to a const array

This commit is contained in:
Jennifer Wang
2022-05-30 14:59:46 -04:00
parent 2c1cf42aa0
commit 970aa299a2
2 changed files with 20 additions and 26 deletions
+2 -13
View File
@@ -1933,19 +1933,8 @@ var StateSysActorCIDsCmd = &cli.Command{
tw := tabwriter.NewWriter(os.Stdout, 2, 4, 2, ' ', 0)
_, _ = fmt.Fprintln(tw, "\nActor\tCID\t")
for _, name := range []string{
actors.AccountKey,
actors.CronKey,
actors.InitKey,
actors.MarketKey,
actors.MinerKey,
actors.MultisigKey,
actors.PaychKey,
actors.PowerKey,
actors.RewardKey,
actors.SystemKey,
actors.VerifregKey,
} {
var actorKeys = actors.GetBuiltinActorsKeys()
for _, name := range actorKeys {
sysActorCID, ok := actors.GetActorCodeID(actorVersion, name)
if !ok {
return xerrors.Errorf("error getting actor %v code id for actor version %d", name,