-
Notifications
You must be signed in to change notification settings - Fork 156
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
Market actor state #330
Market actor state #330
Conversation
|
||
self.delete_deal(store, deal_id, 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.
Although I don't see it used anywhere, generateStorageDealID
is not included here.
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.
it's only used in the market actor, which is why I think I left it out initially. I added it now anyway though
vm/actor/src/builtin/market/state.rs
Outdated
assert!(deal.start_epoch <= epoch); | ||
|
||
let deal_end = if ever_slashed { | ||
assert!(state.slash_epoch.unwrap() <= deal.end_epoch); |
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.
Do we want to leave assets in the code?
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.
asserts*
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.
no reason not to I don't think, if it fails it is a bug or something malicious, and would be caught. Not really a good reason to just pass back an error that could be missed
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.
True. Would it make sense to fail with a message then? Or do asserts give you the line number?
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.
They do, I can add a message anyway I guess, this isn't something we expect to ever hit though, just a sanity check
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes #320
Other information and links