Skip to content

Commit

Permalink
Add tracking for supply info inside verify_issue_bundle (#55)
Browse files Browse the repository at this point in the history
1. Added a new error, `ValueSumOverflow`, that occurs if the sum value overflows when adding new supply amounts.
2. Created a new `supply_info` module containing `SupplyInfo` and `AssetSupply` structures, with `add_supply` function and unit tests for it.
3. Renamed the `are_note_asset_ids_derived_correctly` function to `verify_supply`, changed its behavior to verify and compute asset supply, added unit tests for it.
4. Updated the `verify_issue_bundle` function to use the changes mentioned above, updated its description, and added new unit tests.
5. Renamed errors with `...NoteType` suffix in the name to `...AssetBase`.
6.  Added `update_finalization_set` method to `SupplyInfo` and use after the calls of `verify_issue_bundle function` (if needed), instead of mutating the finalization set inside `verify_issue_bundle`.
  • Loading branch information
dmidem authored May 4, 2023
1 parent 7d3b6df commit ea0fd59
Show file tree
Hide file tree
Showing 4 changed files with 536 additions and 106 deletions.
Loading

0 comments on commit ea0fd59

Please sign in to comment.