-
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
Handle deal id changes in OnDealSectorCommitted #4730
Conversation
Fixes #3566 |
fixes #3461 |
(lint fails) |
@magik6k re: lint -- yes I know, it seems not to like my table test structure and I'm not sure what to do about it. The closure in question is the sub test function. |
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.
@magik6k I have some comments about GetCurrentDealInfo and testing the old deal first.
Fixes #3474 |
func GetCurrentDealInfo(ctx context.Context, ts *types.TipSet, api getCurrentDealInfoAPI, dealID abi.DealID, proposal market.DealProposal, publishCid *cid.Cid) (abi.DealID, *api.MarketDeal, error) { | ||
marketDeal, dealErr := api.StateMarketStorageDeal(ctx, dealID, ts.Key()) | ||
if dealErr == nil { | ||
if marketDeal.Proposal == proposal { |
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.
Are we sure comparing these like this is correct? no pointers involved or anything fishy like that?
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.
nope those are both structs. neither have pointers to my knowledge (they're on chain structs, so that would make sense)
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.
then again, the fact that we're failing the deal flow tests suggests otherwise. will investigate.
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.
nice, the Client address gets translated to an actor address in chain state, so this will not work.
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
make OnDealSectorCommitted handle changes to deal ids
extract OnDealSectorCommitted from adapters and test
in OnDealSectorCommitted, verify that deals looked up match the deal proposals which were made
correct comparison of deal equality (a strict == is not enough)
26f0255
to
314dda0
Compare
update to tagged 1.0.1 release & also fix lint error
Goals
Resolve deal id not found
Implementation
Pairs with filecoin-project/go-fil-markets#441