pub trait PoolStrategy: Send + Sync {
// Required methods
fn pool_type(&self) -> PoolType;
fn calculate_shares(
&self,
proofs: &[ProofRecord],
reward: u64,
) -> Result<Vec<MinerShare>, TribeError>;
fn minimum_stake(&self) -> u64;
fn accept_miner(&self, miner: &MinerInfo) -> Result<bool, TribeError>;
fn pool_info(&self, miners: usize, total_stake: u64) -> PoolInfo;
}Expand description
How mining rewards are distributed among participants.
Required Methods§
fn pool_type(&self) -> PoolType
fn minimum_stake(&self) -> u64
fn accept_miner(&self, miner: &MinerInfo) -> Result<bool, TribeError>
fn pool_info(&self, miners: usize, total_stake: u64) -> PoolInfo
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".