Struct fuel_core_p2p::service::SharedState
source · pub struct SharedState { /* private fields */ }
Implementations§
pub fn notify_gossip_transaction_validity( &self, message_info: GossipsubMessageInfo, acceptance: GossipsubMessageAcceptance ) -> Result<()>
pub async fn get_block( &self, height: BlockHeight ) -> Result<Option<SealedBlock>>
pub async fn get_sealed_block_header( &self, height: BlockHeight ) -> Result<Option<(Vec<u8>, SealedBlockHeader)>>
pub async fn get_transactions_from_peer( &self, peer_id: Vec<u8>, block_id: BlockId ) -> Result<Option<Vec<Transaction>>>
pub fn broadcast_vote(&self, vote: Arc<ConsensusVote>) -> Result<()>
pub fn broadcast_block(&self, block: Arc<Block>) -> Result<()>
pub fn broadcast_transaction(&self, transaction: Arc<Transaction>) -> Result<()>
pub async fn get_peer_ids(&self) -> Result<Vec<PeerId>>
pub fn subscribe_tx(&self) -> Receiver<TransactionGossipData>
pub fn subscribe_block_height(&self) -> Receiver<BlockHeightHeartbeatData>
pub fn report_peer<T: PeerReport>( &self, peer_id: FuelPeerId, peer_report: T, reporting_service: &'static str ) -> Result<()>
Trait Implementations§
source§fn clone(&self) -> SharedState
fn clone(&self) -> SharedState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
Blanket Implementations§
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more