-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
263 add optimizations audit recommendations (#392)
* SYS-04 Double Iterations can be merged into a single one * SRL-02/SRW-02 limit parameter type optimization. get_latest_transactions was removed so no need to change there, makes use of get_transactions * RPC-01/ Closure usage could simplify the codebase * PRO-02/PRF-02 Return Type Could be an Option * LIV-01 Duplicated Helper Function Call * LIP-04/LI5-04 Potential Unnecessary Computations * LIP-03/LI5-03 Redundant Condition Check * Rollback on LIV-01, try_deposit_collateral is also used in other pallets, cannot modify like proposed. * LII-02/LBS-01 Duplicated Condition Check * 4FC-06/9B2-06 Loops optimizations with iterators * refactor for RPC-01 * Fix weird indentation within macro * Replace `get_old_vault_replace_requests_filter` * Fix mock type declaration issues * Change signature of `get_vault_redeem_requests()` * RPC-01 fixed mock issue by adding constrained trait object, functions are left as generic so to avoid the need of a second map and filter/transform can be done in one iterator * Fix (potential) bug introduced before in 4FC-06/9B2-06. mut requests passed to drain expired() does hold active requests after execution now. * Refactor RPC-01. Remove the need for 2 into_iter() calls * Refactor PRO-02/PRF-02. Also return None when building fails. * FIX issue introduced by LII-02/LBS-01. Second check is needed. * Refactor on LIP-04/LI5-04. * Update pallets/vault-registry/src/lib.rs remove empty line Co-authored-by: Marcel Ebert <mail@marcel-ebert.de> * Update pallets/vault-registry/src/lib.rs remove empty line Co-authored-by: Marcel Ebert <mail@marcel-ebert.de> * format * clippy changes --------- Co-authored-by: Marcel Ebert <mail@marcel-ebert.de>
- Loading branch information
Showing
12 changed files
with
181 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.