redelegate stake (#5868)

* redelegate stake

* boil this down to just delegate(), which can be offered any number of times
This commit is contained in:
Rob Walker
2019-09-11 09:48:29 -07:00
committed by GitHub
parent 1853771930
commit 92d2452f33
3 changed files with 173 additions and 114 deletions

View File

@@ -24,8 +24,11 @@ pub const DEFAULT_SLASH_PENALTY: u8 = ((5 * std::u8::MAX as usize) / 100) as u8;
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone, Copy)]
pub struct Config {
/// how much stake we can activate per-epoch as a fraction of currently effective stake
pub warmup_rate: f64,
/// how much stake we can deactivate as a fraction of currently effective stake
pub cooldown_rate: f64,
/// percentage of stake lost when slash, expressed as a portion of std::u8::MAX
pub slash_penalty: u8,
}