mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Allow immediate deallocation if the decrease doesn't cross a key-share threshold
This commit is contained in:
@@ -480,7 +480,7 @@ pub mod pallet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !active {
|
if (!active) || (decrease_in_key_shares == 0) {
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,7 +491,6 @@ pub mod pallet {
|
|||||||
// next set ends
|
// next set ends
|
||||||
to_unlock_on.0 += 2;
|
to_unlock_on.0 += 2;
|
||||||
} else {
|
} else {
|
||||||
// TODO: We can immediately free it if the deallocation doesn't cross a key share threshold
|
|
||||||
to_unlock_on.0 += 1;
|
to_unlock_on.0 += 1;
|
||||||
}
|
}
|
||||||
// Increase the session by one, creating a cooldown period
|
// Increase the session by one, creating a cooldown period
|
||||||
|
|||||||
Reference in New Issue
Block a user