@@ -880,7 +880,7 @@ mod tests {
880880 . hit_epoch ( deps. as_mut ( ) )
881881 . assert_bond ( & [ ] ) // No bond msgs after jailing
882882 . assert_unbond ( & [ ] ) // No unbond msgs after jailing
883- . assert_rewards ( & [ "val1" , " val2"] ) ; // But rewards are still being gathered
883+ . assert_rewards ( & [ "val2" ] ) ; // Rewards are not gathered anymore because of the removal
884884
885885 // Check that the bonded amounts of val1 have been slashed for being offline (10%)
886886 // Val2 is unaffected.
@@ -946,7 +946,7 @@ mod tests {
946946 . hit_epoch ( deps. as_mut ( ) )
947947 . assert_bond ( & [ ( "val1" , ( 20u128 , & denom) ) ] ) // Tombstoned validators can still bond
948948 . assert_unbond ( & [ ] ) // No unbond msgs after jailing
949- . assert_rewards ( & [ "val1" ] ) ; // Rewards are still being gathered
949+ . assert_rewards ( & [ ] ) ; // Rewards are not gathered anymore because of jailing implying removal
950950
951951 // Check that the non-slashed amounts of val1 have been bonded
952952 let bonded = contract. bonded . load ( deps. as_ref ( ) . storage ) . unwrap ( ) ;
@@ -978,7 +978,7 @@ mod tests {
978978 . hit_epoch ( deps. as_mut ( ) )
979979 . assert_bond ( & [ ] ) // No bond msgs after jailing
980980 . assert_unbond ( & [ ( "val1" , ( 9u128 , & denom) ) ] ) // Only unbond non-slashed amount
981- . assert_rewards ( & [ "val1" ] ) ; // Rewards are still being gathered
981+ . assert_rewards ( & [ ] ) ; // Rewards are not gathered anymore because of the removal
982982
983983 // Check that the non-slashed amounts of val1 have been unbonded
984984 // FIXME: Remove / filter zero amounts
@@ -1424,8 +1424,17 @@ mod tests {
14241424 }
14251425
14261426 fn jail ( & self , deps : DepsMut , val : & str ) {
1427- self . handle_valset_update ( deps, & [ ] , & [ ] , & [ ] , & [ val. to_string ( ) ] , & [ ] , & [ ] )
1428- . unwrap ( ) ;
1427+ // We sent a removal along with the jail, as this is what the blockchain does
1428+ self . handle_valset_update (
1429+ deps,
1430+ & [ ] ,
1431+ & [ val. to_string ( ) ] ,
1432+ & [ ] ,
1433+ & [ val. to_string ( ) ] ,
1434+ & [ ] ,
1435+ & [ ] ,
1436+ )
1437+ . unwrap ( ) ;
14291438 }
14301439
14311440 fn unjail ( & self , deps : DepsMut , val : & str ) {
0 commit comments