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

virtual-staking: jailing / tombstoning tests #142

Merged
merged 15 commits into from
Oct 12, 2023
Prev Previous commit
Adjust FIXMEs / comments
  • Loading branch information
maurolacy committed Oct 12, 2023
commit c83cbca1424ef090b2ac55d0b88de68e7a3c7cbe
4 changes: 1 addition & 3 deletions contracts/consumer/virtual-staking/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ mod tests {
.hit_epoch(deps.as_mut())
.assert_bond(&[]) // No bond msgs after unjailing
.assert_unbond(&[]) // No unbond msgs after unjailing
.assert_rewards(&["val1", "val2"]);
.assert_rewards(&["val1", "val2"]); // Rewards are gathered
}

#[test]
Expand Down Expand Up @@ -735,7 +735,6 @@ mod tests {
.assert_rewards(&["val1"]); // Rewards are still being gathered

// Check that the non-slashed amounts of val1 have been bonded
// FIXME: Remove / filter zero amounts
let bonded = contract.bonded.load(deps.as_ref().storage).unwrap();
assert_eq!(bonded, [("val1".to_string(), Uint128::new(29)),]);
}
Expand Down Expand Up @@ -876,7 +875,6 @@ mod tests {
.assert_rewards(&["val1"]); // Rewards are still being gathered

// Check that the previously bonded amounts of val1 have been slashed for double sign (25%)
// TODO: Check that the amounts have been slashed for double sign on-chain (needs mt slashing / tombstoning support)
let bonded = contract.bonded.load(deps.as_ref().storage).unwrap();
assert_eq!(
bonded,
Expand Down
Loading