Merge pull request #7749 from filecoin-project/gstuart/sort-lotus-miner-retrieval-deals
Sort lotus-miner retrieval-deals by dealId
This commit is contained in:
commit
a0d76bda99
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
"github.com/docker/go-units"
|
"github.com/docker/go-units"
|
||||||
@ -137,6 +138,10 @@ var retrievalDealsListCmd = &cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.Slice(deals, func(i, j int) bool {
|
||||||
|
return deals[i].ID < deals[j].ID
|
||||||
|
})
|
||||||
|
|
||||||
w := tabwriter.NewWriter(os.Stdout, 2, 4, 2, ' ', 0)
|
w := tabwriter.NewWriter(os.Stdout, 2, 4, 2, ' ', 0)
|
||||||
|
|
||||||
_, _ = fmt.Fprintf(w, "Receiver\tDealID\tPayload\tState\tPricePerByte\tBytesSent\tMessage\n")
|
_, _ = fmt.Fprintf(w, "Receiver\tDealID\tPayload\tState\tPricePerByte\tBytesSent\tMessage\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user