Api call to get actor cids works for versions < 16

This commit is contained in:
Geoff Stuart
2022-06-29 14:58:56 -04:00
parent 709fe5c65e
commit ed65b4c3bf
15 changed files with 460 additions and 38 deletions
+6 -13
View File
@@ -1900,19 +1900,7 @@ var StateSysActorCIDsCmd = &cli.Command{
ctx := ReqContext(cctx)
ts, err := LoadTipSet(ctx, cctx, api)
if err != nil {
return err
}
nv, err := api.StateNetworkVersion(ctx, ts.Key())
if err != nil {
return err
}
if cctx.IsSet("network-version") {
nv = network.Version(cctx.Uint64("network-version"))
}
nv := network.Version(cctx.Uint64("network-version"))
fmt.Printf("Network Version: %d\n", nv)
@@ -1922,6 +1910,11 @@ var StateSysActorCIDsCmd = &cli.Command{
}
fmt.Printf("Actor Version: %d\n", actorVersion)
manifestCid, ok := actors.GetManifest(actorVersion)
if ok {
fmt.Printf("Manifest CID: %v\n", manifestCid)
}
tw := tabwriter.NewWriter(os.Stdout, 2, 4, 2, ' ', 0)
_, _ = fmt.Fprintln(tw, "\nActor\tCID\t")