[−][src]Struct grin_servers::common::adapters::ChainToPoolAndNetAdapter
Implementation of the ChainAdapter for the network. Gets notified when the accepted a new block, asking the pool to update its state and the network to broadcast the block
Implementations
impl<B, P, V> ChainToPoolAndNetAdapter<B, P, V> where
B: BlockChain,
P: PoolAdapter,
V: VerifierCache + 'static,
[src]
B: BlockChain,
P: PoolAdapter,
V: VerifierCache + 'static,
pub fn new(
tx_pool: Arc<RwLock<TransactionPool<B, P, V>>>,
hooks: Vec<Box<dyn ChainEvents + Send + Sync>>
) -> Self
[src]
tx_pool: Arc<RwLock<TransactionPool<B, P, V>>>,
hooks: Vec<Box<dyn ChainEvents + Send + Sync>>
) -> Self
Construct a ChainToPoolAndNetAdapter instance.
pub fn init(&self, peers: Arc<Peers>)
[src]
Initialize a ChainToPoolAndNetAdapter instance with handle to a Peers object. Should only be called once.
Trait Implementations
impl<B, P, V> ChainAdapter for ChainToPoolAndNetAdapter<B, P, V> where
B: BlockChain,
P: PoolAdapter,
V: VerifierCache + 'static,
[src]
B: BlockChain,
P: PoolAdapter,
V: VerifierCache + 'static,
fn block_accepted(&self, b: &Block, status: BlockStatus, opts: Options)
[src]
Auto Trait Implementations
impl<B, P, V> !RefUnwindSafe for ChainToPoolAndNetAdapter<B, P, V>
impl<B, P, V> Send for ChainToPoolAndNetAdapter<B, P, V>
impl<B, P, V> Sync for ChainToPoolAndNetAdapter<B, P, V>
impl<B, P, V> Unpin for ChainToPoolAndNetAdapter<B, P, V>
impl<B, P, V> !UnwindSafe for ChainToPoolAndNetAdapter<B, P, V>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,