-
Notifications
You must be signed in to change notification settings - Fork 59
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
allow specification of 'wallet' for ensure funds calls #129
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.
LGTM
Non-blocking question on changing the client node method -- is there ever a scenario where the client ahs two addresses?
@@ -209,7 +209,7 @@ func (c *Client) Start(ctx context.Context, p ClientDealProposal) (cid.Cid, erro | |||
ClientCollateral: big.Zero(), | |||
} | |||
|
|||
if err := c.node.EnsureFunds(ctx, p.Client, dealProposal.ClientBalanceRequirement()); err != nil { | |||
if err := c.node.EnsureFunds(ctx, p.Client, p.Client, dealProposal.ClientBalanceRequirement()); err != nil { |
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.
Just curious what is the value of StorageClientNode taking two parameters if it's always going to be the same (it's clear why for the provider where the values are different)
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.
ah cause we have a common method in the integration test... I wonder if it would be better to just rewrite the test to not use fake common for that method.
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.
cause in the implementation it's actually two different entire classes that don't share anything
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.
(as mentioned in slack) lotus also uses a common thingy for implementing this. We could have them be separate interfaces, but i think the mental overhead is lower if we just have it be the same. Plus, theres no reason you couldnt fund your deal collateral with a different account
When trying to ensure funds for a miner, we were just adding funds to the worker key, which doesnt really help much (its not associated with the miner on chain in that way). Switching that over, things then tried to send money from the miner actor, which obviously doesnt work, so now we pass the address you want to ensure has funds on the market, and the address to send funds from.