pub struct EthSync {
    network: NetworkService,
    eth_handler: Arc<SyncProtocolHandler>,
    subprotocol_name: U64,
    priority_tasks: Mutex<RawMutex, Sender<PriorityTask>>,
    new_transaction_hashes: Sender<H256>,
}
Expand description

Ethereum network protocol handler

Fields

network: NetworkService

Network service

eth_handler: Arc<SyncProtocolHandler>

Main (eth/par) protocol handler

subprotocol_name: U64

The main subprotocol name

priority_tasks: Mutex<RawMutex, Sender<PriorityTask>>

Priority tasks notification channel

new_transaction_hashes: Sender<H256>

New incoming transactions notification channel

Implementations

Creates and register protocol with the network service

Priority tasks producer

New transactions hashes producer

Trait Implementations

fires when new block is about to be imported implementations should be light Read more

fires when chain has new blocks.

fires when chain achieves active mode

fires when chain achieves passive mode

fires when chain broadcasts a message

fires when new transactions are received from a peer

Set to allow unreserved peers to connect

Set to deny unreserved peers to connect

Remove reservation for the peer

Add reserved peer

Start network

Stop network

Returns the minimum and maximum peers.

Get network context for protocol.

Get sync status

Get sync peers

Get the enode if available.

Returns propagation count for pending transactions.

Returns propagation count for new transactions.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.