pub struct SlotProto<'a, C: Consensus, D: Driver> {
pub cd: &'a ConsensusDriver<C, D>,
pub local_state: &'a LocalState,
pub slot_state: &'a mut SlotState,
}Fields§
§cd: &'a ConsensusDriver<C, D>§local_state: &'a LocalState§slot_state: &'a mut SlotStateImplementations§
Source§impl<'a, C: Consensus, D: Driver> SlotProto<'a, C, D>
impl<'a, C: Consensus, D: Driver> SlotProto<'a, C, D>
pub fn nomination_proto(&mut self) -> NominationProto<'_, 'a, C, D>
pub fn ballot_proto(&mut self) -> BallotProto<'_, 'a, C, D>
pub fn local_proto(&self) -> LocalProto<'_, C, D>
pub fn index(&self) -> SlotIndex
pub fn ballot_state(&self) -> &BallotState
pub fn ballot_state_mut(&mut self) -> &mut BallotState
pub fn nomination(&self) -> &NominationState
pub fn nomination_mut(&mut self) -> &mut NominationState
pub fn driver(&self) -> &D
pub fn consensus(&self) -> &C
pub fn driver_calling_back(&mut self, cb: DriverCallback)
pub fn get_companion_quorum_set_hash_from_statement( statement: &SCPStatement, ) -> SCPHash
Sourcepub fn get_statement_values(
statement: &SCPStatement,
) -> (Vec<SCPValue>, Vec<SCPValue>)
pub fn get_statement_values( statement: &SCPStatement, ) -> (Vec<SCPValue>, Vec<SCPValue>)
returns (nom values, ballot values)
pub fn get_quorum_set_from_statement( &self, statement: &SCPStatement, ) -> Option<SCPQuorumSet>
pub fn get_state( &mut self, node: &SCPNodeID, self_already_moved_on: bool, ) -> QuorumInfoNodeState
pub fn should_process_envelope(&mut self, env: &SCPEnvelope, ours: bool) -> bool
pub fn process_envelope( &mut self, envelope: &SCPEnvelope, ours: bool, ) -> EnvelopeState
pub fn abandon_ballot(&mut self) -> bool
pub fn bump_state(&mut self, value: &SCPValue, force: bool) -> bool
pub fn nominate( &mut self, value: &SCPValue, previous_value: &SCPValue, timed_out: bool, ) -> bool
pub fn stop_nomination(&mut self)
pub fn get_nomination_leaders(&mut self) -> HashSet<SCPNodeID>
pub fn set_fully_validated(&mut self, validated: bool)
pub fn get_latest_composite_candidate(&mut self) -> Option<SCPValue>
pub fn create_envelope(&mut self, statement: SCPStatement) -> SCPEnvelope
pub fn is_fully_validated(&self) -> bool
pub fn get_json_info(&mut self, full_keys: bool) -> Value
pub fn get_json_quorum_info( &mut self, id: &SCPNodeID, summary: bool, full_keys: bool, ) -> Value
pub fn federated_accept<F1, F2>( &self, voted: &F1, accepted: &F2, envs: &HashMap<SCPNodeID, SCPEnvelope>, ) -> bool
pub fn federated_ratify<F>( &self, voted: &F, envs: &HashMap<SCPNodeID, SCPEnvelope>, ) -> bool
pub fn get_statement_count(&self) -> usize
pub fn got_vblocking(&self) -> bool
pub fn get_entire_current_state(&mut self) -> Vec<SCPEnvelope>
pub fn get_latest_messages_send(&mut self) -> Vec<SCPEnvelope>
pub fn get_latest_message(&mut self, node_id: &SCPNodeID) -> Option<SCPEnvelope>
pub fn maybe_set_got_vblocking(&mut self)
pub fn set_state_from_envelope(&mut self, envelope: &SCPEnvelope)
pub fn process_current_state<F>(&mut self, f: &mut F, force_self: bool)
pub fn is_newer_nomination_or_ballot_st( old_st: &SCPStatement, new_st: &SCPStatement, ) -> bool
pub fn get_externalizing_state(&mut self) -> Vec<SCPEnvelope>
Sourcepub fn get_externalized_slot_proof(
&mut self,
) -> Result<Option<ExternalizedSlotProof>, ExternalizedSlotProofError>
pub fn get_externalized_slot_proof( &mut self, ) -> Result<Option<ExternalizedSlotProof>, ExternalizedSlotProofError>
Builds a proof snapshot for this slot after it externalizes.
Returns Ok(None) only when the slot has no externalizing state yet.
pub fn record_statement(&mut self, st: &SCPStatement)
Trait Implementations§
Auto Trait Implementations§
impl<'a, C, D> !UnwindSafe for SlotProto<'a, C, D>
impl<'a, C, D> Forget for SlotProto<'a, C, D>
impl<'a, C, D> Freeze for SlotProto<'a, C, D>
impl<'a, C, D> Move for SlotProto<'a, C, D>
impl<'a, C, D> RefUnwindSafe for SlotProto<'a, C, D>where
C: RefUnwindSafe,
D: RefUnwindSafe,
impl<'a, C, D> Send for SlotProto<'a, C, D>where
&'a ConsensusDriver<C, D>: Send,
&'a LocalState: Send,
RawTable<(BytesM<u32::MAX>, ())>: Send,
RawTable<(PublicKey, SCPEnvelope)>: Send,
BoxRaw<MlDsa65PublicKey>: Send,
RawVecInner: Send,
BoxRaw<MlDsa65Signature>: Send,
RawTable<(PublicKey, ())>: Send,
impl<'a, C, D> Sync for SlotProto<'a, C, D>
impl<'a, C, D> Unpin for SlotProto<'a, C, D>
impl<'a, C, D> UnsafeUnpin for SlotProto<'a, C, D>where
&'a ConsensusDriver<C, D>: UnsafeUnpin,
&'a LocalState: UnsafeUnpin,
&'a mut SlotState: UnsafeUnpin,
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