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

test: inequality in streamed amount invariant #315

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

andreivladbrg
Copy link
Member

Closes #307

test: remove delay from store
@smol-ninja smol-ninja changed the title test: use inequality in inv test test: use inequality in invariant Oct 16, 2024
@smol-ninja smol-ninja changed the title test: use inequality in invariant test: use inequality in streamed amount invariant Oct 16, 2024
@smol-ninja smol-ninja changed the title test: use inequality in streamed amount invariant test: inequality in streamed amount invariant Oct 16, 2024
@smol-ninja smol-ninja force-pushed the test/inv-inequality branch 2 times, most recently from 2ca57d6 to 2fad05a Compare October 17, 2024 13:59

assertEq(
totalStreamedAmountWithDelay,
assertLe(
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why is there an "Le" here? Previously, we had the following relations:

  1. $totalStreamedAmount \ge totalStreamedAmountWithDelay$
  2. $totalStreamedAmountWithDelay = totalDebt + totalWithdrawn$

Therefore from the above two, the new relation should be

  • $totalStreamedAmount \ge totalDebt + totalWithdrawn$

and not the opposite.

Copy link
Member

Choose a reason for hiding this comment

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

@smol-ninja smol-ninja merged commit b638354 into main Oct 17, 2024
7 checks passed
@smol-ninja smol-ninja deleted the test/inv-inequality branch October 17, 2024 14:25
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.

replace the delay logic from invariant with an inequality
2 participants