Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vote-interface/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ impl Lockout {

// The number of slots for which this vote is locked
pub fn lockout(&self) -> u64 {
(INITIAL_LOCKOUT as u64).pow(self.confirmation_count())
(INITIAL_LOCKOUT as u64).wrapping_pow(std::cmp::min(
self.confirmation_count(),
MAX_LOCKOUT_HISTORY as u32,
))
}

// The last slot at which a vote is still locked out. Validators should not
Expand Down