Skip to content
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

[nis]: track balance resets due to description change as expirations #575

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

Jaguar0625
Copy link
Contributor

[nis]: update MosaicDefinitionCreationObserver to track expirations

 problem: prior to mosaic redefinition fork, a mosaic description change
          would effectively zero all balances
solution: update MosaicDefinitionCreationObserver to track these
          balance resets as mosaic expirations


[nis]: replace ExpiredMosaicCache.removeAll with ExpiredMosaicCache.removeExpiration

 problem: handling of mosaic description changes prior to the mosaic redefinition fork height
          requires the ability to remove a specific mosaic at a specific height
solution: replace removeAll with removeExpiration
          update ExpiredNamespacesObserver

@Jaguar0625 Jaguar0625 requested a review from Wayonb October 7, 2024 18:23
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.57%. Comparing base (ba15c0c) to head (683034d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                dev     #575   +/-   ##
=========================================
  Coverage     93.56%   93.57%           
- Complexity     6074     6079    +5     
=========================================
  Files           719      719           
  Lines         17361    17379   +18     
  Branches       1308     1313    +5     
=========================================
+ Hits          16244    16262   +18     
  Misses          864      864           
  Partials        253      253           
Flag Coverage Δ
nem-nis 94.20% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...a/org/nem/nis/cache/DefaultExpiredMosaicCache.java 95.34% <100.00%> (+0.75%) ⬆️
.../nem/nis/cache/SynchronizedExpiredMosaicCache.java 100.00% <100.00%> (ø)
...em/nis/secret/BlockTransactionObserverFactory.java 100.00% <100.00%> (ø)
.../org/nem/nis/secret/ExpiredNamespacesObserver.java 100.00% <100.00%> (ø)
...m/nis/secret/MosaicDefinitionCreationObserver.java 100.00% <100.00%> (ø)

Copy link
Contributor

@Wayonb Wayonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏾

…emoveExpiration

 problem: handling of mosaic description changes prior to the mosaic redefinition fork height
          requires the ability to remove a specific mosaic at a specific height
solution: replace removeAll with removeExpiration
          update ExpiredNamespacesObserver
 problem: prior to mosaic redefinition fork, a mosaic description change
          would effectively zero all balances
solution: update MosaicDefinitionCreationObserver to track these
          balance resets as mosaic expirations
@Jaguar0625 Jaguar0625 force-pushed the nis/pre-mosaic-redefinition-fork-handling branch from 683034d to b5a936f Compare October 9, 2024 12:34
@Jaguar0625 Jaguar0625 merged commit b5a936f into dev Oct 9, 2024
4 checks passed
@Jaguar0625 Jaguar0625 deleted the nis/pre-mosaic-redefinition-fork-handling branch October 9, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants