[−][src]Struct grin_p2p::DummyAdapter
A no-op network adapter used for testing.
Trait Implementations
impl ChainAdapter for DummyAdapter
[src]
impl ChainAdapter for DummyAdapter
fn total_difficulty(&self) -> Difficulty
[src]
fn total_difficulty(&self) -> Difficulty
Current total difficulty on our chain
fn total_height(&self) -> u64
[src]
fn total_height(&self) -> u64
Current total height
fn transaction_received(&self, _: Transaction, _stem: bool)
[src]
fn transaction_received(&self, _: Transaction, _stem: bool)
A valid transaction has been received from one of our peers
fn compact_block_received(&self, _cb: CompactBlock, _addr: SocketAddr) -> bool
[src]
fn compact_block_received(&self, _cb: CompactBlock, _addr: SocketAddr) -> bool
fn header_received(&self, _bh: BlockHeader, _addr: SocketAddr) -> bool
[src]
fn header_received(&self, _bh: BlockHeader, _addr: SocketAddr) -> bool
fn block_received(&self, _: Block, _: SocketAddr) -> bool
[src]
fn block_received(&self, _: Block, _: SocketAddr) -> bool
A block has been received from one of our peers. Returns true if the block could be handled properly and is not deemed defective by the chain. Returning false means the block will never be valid and may result in the peer being banned. Read more
fn headers_received(&self, _: Vec<BlockHeader>, _: SocketAddr) -> bool
[src]
fn headers_received(&self, _: Vec<BlockHeader>, _: SocketAddr) -> bool
A set of block header has been received, typically in response to a block header request. Read more
fn locate_headers(&self, _: Vec<Hash>) -> Vec<BlockHeader>
[src]
fn locate_headers(&self, _: Vec<Hash>) -> Vec<BlockHeader>
Finds a list of block headers based on the provided locator. Tries to identify the common chain and gets the headers that follow it immediately. Read more
fn get_block(&self, _: Hash) -> Option<Block>
[src]
fn get_block(&self, _: Hash) -> Option<Block>
Gets a full block by its hash.
fn txhashset_read(&self, _h: Hash) -> Option<TxHashSetRead>
[src]
fn txhashset_read(&self, _h: Hash) -> Option<TxHashSetRead>
Provides a reading view into the current txhashset state as well as the required indexes for a consumer to rewind to a consistant state at the provided block hash. Read more
fn txhashset_receive_ready(&self) -> bool
[src]
fn txhashset_receive_ready(&self) -> bool
Whether the node is ready to accept a new txhashset. If this isn't the case, the archive is provided without being requested and likely an attack attempt. This should be checked before downloading the whole state data. Read more
fn txhashset_write(
&self,
_h: Hash,
_txhashset_data: File,
_peer_addr: SocketAddr
) -> bool
[src]
fn txhashset_write(
&self,
_h: Hash,
_txhashset_data: File,
_peer_addr: SocketAddr
) -> bool
Writes a reading view on a txhashset state that's been provided to us. If we're willing to accept that new state, the data stream will be read as a zip file, unzipped and the resulting state files should be rewound to the provided indexes. Read more
fn txhashset_download_update(
&self,
_start_time: DateTime<Utc>,
_downloaded_size: u64,
_total_size: u64
) -> bool
[src]
fn txhashset_download_update(
&self,
_start_time: DateTime<Utc>,
_downloaded_size: u64,
_total_size: u64
) -> bool
Update txhashset downloading progress
impl NetAdapter for DummyAdapter
[src]
impl NetAdapter for DummyAdapter
fn find_peer_addrs(&self, _: Capabilities) -> Vec<SocketAddr>
[src]
fn find_peer_addrs(&self, _: Capabilities) -> Vec<SocketAddr>
Find good peers we know with the provided capability and return their addresses. Read more
fn peer_addrs_received(&self, _: Vec<SocketAddr>)
[src]
fn peer_addrs_received(&self, _: Vec<SocketAddr>)
A list of peers has been received from one of our peers.
fn peer_difficulty(&self, _: SocketAddr, _: Difficulty, _: u64)
[src]
fn peer_difficulty(&self, _: SocketAddr, _: Difficulty, _: u64)
Heard total_difficulty from a connected peer (via ping/pong).
fn is_banned(&self, _: SocketAddr) -> bool
[src]
fn is_banned(&self, _: SocketAddr) -> bool
Is this peer currently banned?
Auto Trait Implementations
impl Send for DummyAdapter
impl Send for DummyAdapter
impl Sync for DummyAdapter
impl Sync for DummyAdapter
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> SafeBorrow for T where
T: ?Sized,
impl<T> SafeBorrow for T where
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
Given ptr
, which was obtained from a prior call to Self::borrow()
, return a value with the same nominal lifetime which is guaranteed to survive mutations to Self
. Read more
impl<T> UnsafeAny for T where
T: Any,
impl<T> UnsafeAny for T where
T: Any,
impl<T> Erased for T
impl<T> Erased for T
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self