-
Notifications
You must be signed in to change notification settings - Fork 431
test: redistribution integration #1415
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
Conversation
shares[i] = burnOrRedistributableShares.get(keys[i]); | ||
(, shares[i]) = burnOrRedistributableShares.tryGet(keys[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a small bug present with the getBurnOrRedistributableShares
getters. EnumerableMap.get()
reverts if a key does not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments
src/test/integration/tests/Deposit_Delegate_Allocate_Slash_Escrow.t.sol
Outdated
Show resolved
Hide resolved
} | ||
|
||
function testFuzz_fullSlash_EscrowTiming_RightAfterPasses(uint24 _random) public rand(_random) { | ||
// 6) Operator is full slashed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do random? Also, this can be in the init step since you do it for all of these tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see why you're slashing full -> to not have to re-calculate the amount they would get out? I guess we can add in a separate PR to not block this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could maybe do a slash half
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can still do random if get_slashing_rand returns the shares out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will improve in next pr
src/test/integration/tests/Deposit_Delegate_Allocate_Slash_Escrow.t.sol
Outdated
Show resolved
Hide resolved
src/test/integration/tests/Deposit_Delegate_Allocate_Slash_Escrow.t.sol
Outdated
Show resolved
Hide resolved
src/test/integration/tests/Deposit_Delegate_Allocate_Slash_Escrow.t.sol
Outdated
Show resolved
Hide resolved
8296fb8
to
64443eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cb68310
into
release-dev/redistribution
**Motivation:** We want integration test coverage for the redistribution relaese. **Modifications:** - Fixed view revert bug (see comment bellow). - Added timing tests (cannot release escrow before delay, can after) **Result:** Integration test coverage.
Motivation:
We want integration test coverage for the redistribution relaese.
Modifications:
Result:
Integration test coverage.