improve staking interface methods (#14023)

* improve staking interface methods

* fix

* fix

* fix build

* restart

* fix

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Kian Paimani
2023-04-27 13:27:12 +02:00
committed by GitHub
parent 31e1329da0
commit 2320bdd388
8 changed files with 99 additions and 24 deletions
+1 -12
View File
@@ -311,6 +311,7 @@ use sp_runtime::{
traits::{AtLeast32BitUnsigned, Convert, Saturating, StaticLookup, Zero},
Perbill, Perquintill, Rounding, RuntimeDebug,
};
pub use sp_staking::StakerStatus;
use sp_staking::{
offence::{Offence, OffenceError, ReportOffence},
EraIndex, SessionIndex,
@@ -381,18 +382,6 @@ impl<AccountId: Ord> Default for EraRewardPoints<AccountId> {
}
}
/// Indicates the initial status of the staker.
#[derive(RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize, Clone))]
pub enum StakerStatus<AccountId> {
/// Chilling.
Idle,
/// Declared desire in validating or already participating in it.
Validator,
/// Nominating for a group of other stakers.
Nominator(Vec<AccountId>),
}
/// A destination account for payment.
#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]
pub enum RewardDestination<AccountId> {