-
Notifications
You must be signed in to change notification settings - Fork 159
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
Updates market actor #496
Updates market actor #496
Conversation
@@ -111,60 +362,51 @@ impl State { | |||
}) | |||
} | |||
|
|||
pub(super) fn maybe_lock_balance<BS: BlockStore>( | |||
fn maybe_lock_balance<BS: BlockStore>( | |||
&mut self, | |||
store: &BS, | |||
addr: &Address, | |||
amount: &TokenAmount, | |||
) -> Result<(), ActorError> { |
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.
This fn should now not return an actor error, since it might cause issues with the caller assuming the exit code is handled correctly (which it isn't 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.
As discussed, this will return an Actor Error due to the usage of get_locked_balance
and get_escrow_balance
returning an ActorError.
})?; | ||
.map_err(|e| ActorError::new(ExitCode::ErrIllegalState, e.into()))?; | ||
|
||
if deal.is_some() { |
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.
You can also do
deal.ok_or_else(|_|ActorError::new(ExitCode::ErrIllegalArgument,format!("given deal already included in another sector: {}", id)))?
* initial market actor updates * fix market actor errs * fix linting issue * made requested changes * update error msg * added verifreg to internal send and mockrt * updated multimap error handling
* Bitfield improvements * Store prefix bits in separate variables * Use the `Result` type alias in reader.rs * Remove unused dependency * Avoid creating vectors unnecessarily * Rename union to merge * Rename multi_union to union * Combine first access with is_empty check * Avoid traversing `self.unset` up front in `BitField::iter` * Updates market actor (#496) * initial market actor updates * fix market actor errs * fix linting issue * made requested changes * update error msg * added verifreg to internal send and mockrt * updated multimap error handling * Update proofs to v4 (#507) * Bump dep versions * Refactor to new proofs types * Switch to from trait and cleanup * Update bootnodes and genesis for testnet (#509) * Remove unnecessary >= * Get rid of redundant `get_mut` * Add UnverifiedBitField type in order to deserialize a bit field without verifying it * Rename RLEPlus to RlePlus in accordance with Rust's naming conventions * Remove pointless mutable reference * Remove UnverifiedBitField * Make sure that RlePlus::new returns an error on integer overflow * Don't yield a run of length 0 whenever a short block has the value 0 Co-authored-by: Dustin Brickwood <dustinbrickwood204@gmail.com> Co-authored-by: Austin Abell <austinabell8@gmail.com>
Summary of changes
Changes introduced in this pull request:
Please advise on the best way to handle some of the errors in market_state, as you will see its not quite 1:1 at the moment since they are mixing err types.
Reference issue to close (if applicable)
Closes #461
Other information and links