sei-chain
sei-chain copied to clipboard
Add light total supply invariance check
Describe your changes and provide context
Add a lightweight check that checks the following invariance every block:
- The total balance of all addresses who have seen any change to their usei/wei balance in the current block should equal to their total balance as of the last block, after adjusting for any burning/minting (as reflected in changes in the
TotalSupply
state)
Testing performed to validate your change
WIP trying to make SC store work in unit tests
Codecov Report
Attention: Patch coverage is 52.00000%
with 120 lines
in your changes are missing coverage. Please review.
Project coverage is 60.44%. Comparing base (
e8e4b3b
) to head (934a170
). Report is 63 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1660 +/- ##
==========================================
- Coverage 61.64% 60.44% -1.21%
==========================================
Files 365 370 +5
Lines 26178 27279 +1101
==========================================
+ Hits 16138 16488 +350
- Misses 8967 9659 +692
- Partials 1073 1132 +59
Files | Coverage Δ | |
---|---|---|
app/app.go | 64.97% <50.00%> (+0.04%) |
:arrow_up: |
app/test_helpers.go | 58.29% <92.59%> (+9.44%) |
:arrow_up: |
app/invariance.go | 40.42% <40.42%> (ø) |