pub trait Executors<T: Config, Balance> {
    // Required methods
    fn active_set() -> Vec<T::AccountId>;
    fn reserve_bond(
        executor: &T::AccountId,
        amount: Balance
    ) -> Result<Balance, DispatchError>;
    fn unreserve_bond(executor: &T::AccountId, amount: Balance) -> Balance;
    fn slash_bond(executor: &T::AccountId, amount: Balance) -> Balance;
    fn increase_bond(executor: &T::AccountId, amount: Balance) -> Balance;
    fn collateral_bond(executor: &T::AccountId) -> Balance;
    fn total_nominated_stake(executor: &T::AccountId) -> Balance;
    fn stakes(
        staker: &T::AccountId
    ) -> Vec<NominatedStake<T::AccountId, Balance>>;
    fn stakes_per_executor(
        executor: &T::AccountId
    ) -> Vec<NominatedStake<T::AccountId, Balance>>;
    fn recalculate_executors_stakes();
}

Required Methods§

source

fn active_set() -> Vec<T::AccountId>

source

fn reserve_bond( executor: &T::AccountId, amount: Balance ) -> Result<Balance, DispatchError>

source

fn unreserve_bond(executor: &T::AccountId, amount: Balance) -> Balance

source

fn slash_bond(executor: &T::AccountId, amount: Balance) -> Balance

source

fn increase_bond(executor: &T::AccountId, amount: Balance) -> Balance

source

fn collateral_bond(executor: &T::AccountId) -> Balance

source

fn total_nominated_stake(executor: &T::AccountId) -> Balance

source

fn stakes(staker: &T::AccountId) -> Vec<NominatedStake<T::AccountId, Balance>>

source

fn stakes_per_executor( executor: &T::AccountId ) -> Vec<NominatedStake<T::AccountId, Balance>>

source

fn recalculate_executors_stakes()

Implementors§

source§

impl<T: Config, Balance: Zero> Executors<T, Balance> for ExecutorsMock<T>