pub struct FragmentGenerator<'a, S: SyncNode + Send> {Show 17 fields
sender: Wallet,
receiver: Wallet,
active_stake_pools: Vec<StakePool>,
vote_plans_for_casting: Vec<VotePlan>,
vote_plans_for_tally: Vec<VotePlan>,
update_proposals_for_casting: Vec<FragmentId>,
bft_leader: Option<KeyPair<Ed25519>>,
node: RemoteJormungandr,
rand: OsRng,
vote_cast_register: Option<VoteCastCounter>,
slots_per_epoch: u32,
fragment_sender: FragmentSender<'a, S>,
stake_pools_count: usize,
vote_plans_for_tally_count: usize,
vote_plans_for_casting_count: usize,
update_proposals_for_casting_count: usize,
fragment_options_count: usize,
}
Fields§
§sender: Wallet
§receiver: Wallet
§active_stake_pools: Vec<StakePool>
§vote_plans_for_casting: Vec<VotePlan>
§vote_plans_for_tally: Vec<VotePlan>
§update_proposals_for_casting: Vec<FragmentId>
§bft_leader: Option<KeyPair<Ed25519>>
§node: RemoteJormungandr
§rand: OsRng
§vote_cast_register: Option<VoteCastCounter>
§slots_per_epoch: u32
§fragment_sender: FragmentSender<'a, S>
§stake_pools_count: usize
§vote_plans_for_tally_count: usize
§vote_plans_for_casting_count: usize
§update_proposals_for_casting_count: usize
§fragment_options_count: usize
Implementations§
source§impl<'a, S: SyncNode + Send> FragmentGenerator<'a, S>
impl<'a, S: SyncNode + Send> FragmentGenerator<'a, S>
pub fn new( sender: Wallet, receiver: Wallet, bft_leader: Option<KeyPair<Ed25519>>, node: RemoteJormungandr, slots_per_epoch: u32, stake_pools_count: usize, vote_plans_for_tally_count: usize, vote_plans_for_casting_count: usize, update_proposals_for_casting_count: usize, fragment_sender: FragmentSender<'a, S> ) -> Self
pub fn active_stake_pools(&self) -> Vec<StakePool>
pub fn prepare(&mut self, start_block_date: BlockDateDto)
pub fn send_random(&mut self) -> Result<MemPoolCheck, FragmentSenderError>
pub fn send_all(&mut self) -> Result<Vec<MemPoolCheck>, FragmentSenderError>
pub fn send_one( &mut self, option: u8 ) -> Result<MemPoolCheck, FragmentSenderError>
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> !RefUnwindSafe for FragmentGenerator<'a, S>
impl<'a, S> Send for FragmentGenerator<'a, S>where S: Sync,
impl<'a, S> !Sync for FragmentGenerator<'a, S>
impl<'a, S> Unpin for FragmentGenerator<'a, S>
impl<'a, S> !UnwindSafe for FragmentGenerator<'a, S>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request