Skip to content

Commit

Permalink
Add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Nov 29, 2023
1 parent 077d6eb commit f6f3569
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/provider/external-staking/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ impl Stake {

/// Slashes all the entries in `pending_unbonds`, returning total slashed amount.
pub fn slash_pending(&mut self, info: &BlockInfo, slash_ratio: Decimal) -> Uint128 {
// TODO: Only slash undelegations that started after the misbehaviour's time. This is not
// possible right now, because we don't have access to the misbehaviour's time. (#177)
self.pending_unbonds
.iter_mut()
.filter(|pending| pending.release_at > info.time)
Expand Down

0 comments on commit f6f3569

Please sign in to comment.