-
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
Add a command to get the fees of a deal #5307
Conversation
cli/state.go
Outdated
} | ||
|
||
var stateGetDealSetCmd = &cli.Command{ | ||
Name: "get-deal", |
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.
state deal get-deal
? I'd make it just state deal get
.
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.
yeah, that's better
cli/state.go
Outdated
} | ||
|
||
var stateDealFeesCmd = &cli.Command{ | ||
Name: "get-fees", |
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.
fees
?
cli/state.go
Outdated
ht = ts.Height() | ||
} | ||
|
||
if pdrStr := cctx.String("provider"); pdrStr != "" { |
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.
if pdrStr := cctx.String("provider"); pdrStr != "" { | |
if cctx.IsSet("provider") { |
deee192
to
5a6d07e
Compare
cli/state.go
Outdated
Flags: []cli.Flag{ | ||
&cli.StringFlag{ | ||
Name: "provider", | ||
Usage: "provider whose outstanding fees you'd like to recover", |
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.
recover?
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.
changed to calculate
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.
@Kubuxu this looks good to you now?
5a6d07e
to
b3d6396
Compare
cli/state.go
Outdated
return fmt.Errorf("failed to parse provider: %w", err) | ||
} | ||
|
||
deals, err := api.StateMarketDeals(ctx, ts.Key()) |
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 avoid this API call, it will return all the milions of deals in the market actor, calling it with curl the response is 366M and takes 1.5min
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.
@arajasek thoughts on this?
Discussion summary: Make this a shed command (since it's gonna be slooowww). The CLI command itself should be better, perhaps using markets info as source of truth. |
Now just a shed command |
Fixes #5294