From 014bd50ba8114fda91d6bc54597dff678bb88e79 Mon Sep 17 00:00:00 2001 From: Trinity Date: Thu, 5 Sep 2024 13:17:28 +0700 Subject: [PATCH] remove not correct test --- .../consumer/virtual-staking/src/contract.rs | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/contracts/consumer/virtual-staking/src/contract.rs b/contracts/consumer/virtual-staking/src/contract.rs index 037e28d4..7621d4b0 100644 --- a/contracts/consumer/virtual-staking/src/contract.rs +++ b/contracts/consumer/virtual-staking/src/contract.rs @@ -1100,46 +1100,6 @@ mod tests { .assert_rewards(&["val1"]); // Rewards are being gathered again } - #[test] - fn validator_tombstoning() { - let (mut deps, knobs) = mock_dependencies(); - - let contract = VirtualStakingContract::new(); - contract.quick_inst(deps.as_mut()); - let denom = contract.config.load(&deps.storage).unwrap().denom; - - knobs.bond_status.update_cap(100u128); - contract.quick_bond(deps.as_mut(), "owner", "val1", 20); - contract.quick_bond(deps.as_mut(), "owner", "val2", 20); - contract - .hit_epoch(deps.as_mut()) - .assert_bond(&[("val1", (20u128, &denom)), ("val2", (20u128, &denom))]) - .assert_rewards(&[]); - - // Val1 is being tombstoned - contract.tombstone(deps.as_mut(), "val1", Decimal::percent(25), Uint128::new(5)); - contract - .hit_epoch(deps.as_mut()) - .assert_bond(&[]) // No bond msgs after tombstoning - .assert_unbond(&[]) // No unbond msgs after tombstoning - .assert_rewards(&["val1", "val2"]); // Last rewards msgs after tombstoning - - // Check that the bonded amounts of val1 have been slashed for double sign (25%) - // Val2 is unaffected. - // 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, - [ - ("val1".to_string(), Uint128::new(15)), - ("val2".to_string(), Uint128::new(20)) - ] - ); - - // Subsequent rewards msgs are removed after validator is tombstoned - contract.hit_epoch(deps.as_mut()).assert_rewards(&["val2"]); - } - #[test] fn validator_tombstoning_pending_bond() { let (mut deps, knobs) = mock_dependencies();