-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose ClientDealSize via CLI #4569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nits.
cli/client.go
Outdated
return err | ||
} | ||
|
||
fmt.Printf("Deal sizes for data cid %s\n", ellipsis(dataCid.String(), 8)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this, the user has just provided this as a parameter
fmt.Printf("Deal sizes for data cid %s\n", ellipsis(dataCid.String(), 8)) |
cli/client.go
Outdated
} | ||
|
||
fmt.Printf("Deal sizes for data cid %s\n", ellipsis(dataCid.String(), 8)) | ||
fmt.Printf(" Piece Size: %v\n", ds.PieceSize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf(" Piece Size: %v\n", ds.PieceSize) | |
fmt.Printf("Piece Size: %v\n", ds.PieceSize) |
cli/client.go
Outdated
@@ -1698,6 +1699,40 @@ var clientRestartTransfer = &cli.Command{ | |||
}, | |||
} | |||
|
|||
var clientDealSize = &cli.Command{ | |||
Name: "deal-size", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call this stat
in case we want to add other things here like CommP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
21f5a2e
to
8141f7b
Compare
Summary
While
ClientDealSize
is exposed via the JSON API, there are some users using the CLI that need this information to create deals (without using interactive deal creation).Example output