-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: types: correctly coalesce coins even with repeated denominations…
… & simplify logic This code correctly coalesces coins with repeated denominations which can come from mistakenly duplicated or split up coins being passed in. However, the code MUST always function correctly regardless of assumptions that no one should ever pass in duplicated denominations. While here simplified the prior clever but hard to understand code, by making the code directly implementing deduplicating the coalescing. Credit to the Ingenuity/Quicksilver codebase which exposed this problem from an observation we made. Fixes #13234
- Loading branch information
Showing
2 changed files
with
52 additions
and
51 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