pub trait NonConsensusNetworkingOps {
type Block;
fn set_block_responder(&mut self, sender: Sender<Self::Block>);
fn query_block<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 QueryBlockRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
Expand description
abstraction of networking operations for non-consensus mina node(s).
Required Associated Types
Required Methods
sourcefn set_block_responder(&mut self, sender: Sender<Self::Block>)
fn set_block_responder(&mut self, sender: Sender<Self::Block>)
Sets the block responder that sends the blocks to the TransitionFrontier
Note that it only assumes that new blocks are being pushed from the network, to support polling with the graphql API(s), there should be a separate long running function in the NonConsensusNetworkingOps impl that is invoked or scheduled separately
sourcefn query_block<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 QueryBlockRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn query_block<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 QueryBlockRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Queries a block with its height and state hash