Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Resolved Issues Partially resolves these two: #88 #45 # Description The fee rounding behavior was adjusted recently to more closely match solidity, but the order of operations was not exactly the same. This caused an occasional slight variation in output (usually off by 1e1), that compounded in situations where we were iteratively assessing fees such as `max_long`. In that case, the error would grow to as much as 1e5. During my effort to find this bug I - modified some math to use the e.g. `.mul_down` syntax instead of `*` where it was sufficiently complicated to require this to easily pattern match against Solidity. - modified `calculate_max_long` to return errors instead of panic. This makes checks in the tests ugly, but that is a temporary problem until we purge the panics all-together (#20) - purged the use of `traced` and `trace_test` which is helpful for debugging but was not actively being used and can slow down tests. # Review Checklists Please check each item **before approving** the pull request. While going through the checklist, it is recommended to leave comments on items that are referenced in the checklist to make sure that they are reviewed. - [ ] **Testing** - [ ] Are there new or updated unit or integration tests? - [ ] Do the tests cover the happy paths? - [ ] Do the tests cover the unhappy paths? - [ ] Are there an adequate number of fuzz tests to ensure that we are covering the full input space? - [ ] If matching Solidity behavior, are there differential fuzz tests that ensure that Rust matches Solidity?
- Loading branch information