client commP outputs Base32-encoded string

This commit is contained in:
laser 2020-06-05 13:13:16 -07:00
parent 2347ba6f39
commit b3eef76cdd

View File

@ -102,11 +102,16 @@ var clientCommPCmd = &cli.Command{
}
ret, err := api.ClientCalcCommP(ctx, cctx.Args().Get(0), miner)
if err != nil {
return err
}
fmt.Println("CID: ", ret.Root)
encoded, err := ret.Root.StringOfBase(multibase.Base32)
if err != nil {
return err
}
fmt.Println("CID: ", encoded)
fmt.Println("Piece size: ", ret.Size)
return nil
},