From 5e4c04d47b57aeded5256e6dda9f268deb1393d2 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Mon, 31 Jul 2023 16:09:54 +0800 Subject: [PATCH] opt: output the complete payloadcid --- cli/retrieval-deals.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cli/retrieval-deals.go b/cli/retrieval-deals.go index 80bd64a9..0f50ba4f 100644 --- a/cli/retrieval-deals.go +++ b/cli/retrieval-deals.go @@ -69,6 +69,10 @@ part statuses: Name: "discard-failed", Usage: "filter errored deal", }, + &cli.BoolFlag{ + Name: "verbose", + Aliases: []string{"v"}, + }, }, Action: func(cctx *cli.Context) error { api, closer, err := NewMarketNode(cctx) @@ -101,12 +105,15 @@ part statuses: for _, deal := range deals { payloadCid := deal.PayloadCID.String() + if !cctx.Bool("verbose") { + payloadCid = "..." + payloadCid[len(payloadCid)-8:] + } _, _ = fmt.Fprintf(w, "%s\t%d\t%s\t%s\t%s\t%d\t%d\t%d\t%s\n", deal.Receiver.String(), deal.ID, - "..."+payloadCid[len(payloadCid)-8:], + payloadCid, retrievalmarket.DealStatuses[deal.Status], deal.PricePerByte.String(), deal.TotalSent,