Skip to content

Commit

Permalink
opt: output the complete payloadcid
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Jul 31, 2023
1 parent 4280df5 commit 5e4c04d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cli/retrieval-deals.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 5e4c04d

Please sign in to comment.