From df33a16f78589f45a29d144582370b0d1d0560cd Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Sat, 25 Jul 2020 12:59:12 -0400 Subject: [PATCH] CLI: Optionally include vesting details in msig inspect --- cli/multisig.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cli/multisig.go b/cli/multisig.go index 983bf55c1..e2ff4e5a7 100644 --- a/cli/multisig.go +++ b/cli/multisig.go @@ -156,7 +156,12 @@ var msigInspectCmd = &cli.Command{ Name: "inspect", Usage: "Inspect a multisig wallet", ArgsUsage: "[address]", - Flags: []cli.Flag{}, + Flags: []cli.Flag{ + &cli.BoolFlag{ + Name: "vesting", + Usage: "Include vesting details", + }, + }, Action: func(cctx *cli.Context) error { if !cctx.Args().Present() { return ShowHelp(cctx, fmt.Errorf("must specify address of multisig to inspect")) @@ -197,6 +202,13 @@ var msigInspectCmd = &cli.Command{ locked := mstate.AmountLocked(head.Height() - mstate.StartEpoch) fmt.Printf("Balance: %s\n", types.FIL(act.Balance)) fmt.Printf("Spendable: %s\n", types.FIL(types.BigSub(act.Balance, locked))) + + if cctx.Bool("vesting") { + fmt.Printf("InitialBalance: %s\n", types.FIL(mstate.InitialBalance)) + fmt.Printf("StartEpoch: %d\n", mstate.StartEpoch) + fmt.Printf("UnlockDuration: %d\n", mstate.UnlockDuration) + } + fmt.Printf("Threshold: %d / %d\n", mstate.NumApprovalsThreshold, len(mstate.Signers)) fmt.Println("Signers:") for _, s := range mstate.Signers {