Struct hersir::controller::monitor::node::JormungandrClient
source · pub struct JormungandrClient {
addr: SocketAddr,
inner_client: NodeClient<Channel>,
rt: Runtime,
}
Fields§
§addr: SocketAddr
§inner_client: NodeClient<Channel>
§rt: Runtime
Implementations§
source§impl JormungandrClient
impl JormungandrClient
pub fn from_address(address: &str) -> Result<JormungandrClient, MockClientError>
pub fn new(addr: SocketAddr) -> JormungandrClient
pub fn wait_for_chain_length(&self, lenght: ChainLength, timeout: Duration)
pub fn handshake(&self, nonce: &[u8]) -> HandshakeResponse
pub fn tip(&self) -> Header
pub fn headers( &self, block_ids: &[Hash] ) -> Result<Vec<Header, Global>, MockClientError>
pub fn get_blocks( &self, blocks_id: &[Hash] ) -> Result<Vec<Block, Global>, MockClientError>
pub fn get_genesis_block_hash(&self) -> Hash
pub fn pull_blocks( &self, from: &[Hash], to: Hash ) -> Result<Vec<Block, Global>, MockClientError>
pub fn pull_blocks_to_tip( &self, from: Hash ) -> Result<Vec<Block, Global>, MockClientError>
pub fn pull_headers( &self, from: &[Hash], to: Hash ) -> Result<Vec<Header, Global>, MockClientError>
pub fn upload_blocks(&self, lib_block: Block) -> Result<(), MockClientError>
pub fn push_headers(&self, lib_header: Header) -> Result<(), MockClientError>
pub fn get_fragments( &self, ids: Vec<Hash, Global> ) -> Result<Vec<Fragment, Global>, MockClientError>
Trait Implementations§
source§impl Clone for JormungandrClient
impl Clone for JormungandrClient
source§fn clone(&self) -> JormungandrClient
fn clone(&self) -> JormungandrClient
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§
impl !RefUnwindSafe for JormungandrClient
impl Send for JormungandrClient
impl Sync for JormungandrClient
impl Unpin for JormungandrClient
impl !UnwindSafe for JormungandrClient
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