Struct NodeCommon

Source
pub struct NodeCommon<Chain: ChainBackend> {
Show 33 fields pub(crate) chain: Chain, pub(crate) blocks: HashMap<BlockHash, InflightBlock>, pub(crate) mempool: Arc<Mutex<Mempool>>, pub(crate) block_filters: Option<Arc<NetworkFilters<FlatFiltersStore>>>, pub(crate) last_filter: BlockHash, pub(crate) peer_id_count: u32, pub(crate) peer_ids: Vec<u32>, pub(crate) peers: HashMap<u32, LocalPeerView>, pub(crate) peer_by_service: HashMap<ServiceFlags, Vec<u32>>, pub(crate) max_banscore: u32, pub(crate) address_man: AddressMan, pub(crate) added_peers: Vec<AddedPeerInfo>, pub(crate) node_rx: UnboundedReceiver<NodeNotification>, pub(crate) node_tx: UnboundedSender<NodeNotification>, pub(crate) socks5: Option<Socks5StreamBuilder>, pub(crate) fixed_peer: Option<LocalAddress>, pub(crate) inflight: HashMap<InflightRequests, (u32, Instant)>, pub(crate) inflight_user_requests: HashMap<UserRequest, (u32, Instant, Sender<NodeResponse>)>, pub(crate) last_tip_update: Instant, pub(crate) last_connection: Instant, pub(crate) last_peer_db_dump: Instant, pub(crate) last_block_request: u32, pub(crate) last_get_address_request: Instant, pub(crate) last_send_addresses: Instant, pub(crate) block_sync_avg: Ema, pub(crate) last_feeler: Instant, pub(crate) startup_time: Instant, pub(crate) last_dns_seed_call: Instant, pub(crate) used_fixed_addresses: bool, pub(crate) config: UtreexoNodeConfig, pub(crate) datadir: String, pub(crate) network: Network, pub(crate) kill_signal: Arc<RwLock<bool>>,
}

Fields§

§chain: Chain§blocks: HashMap<BlockHash, InflightBlock>§mempool: Arc<Mutex<Mempool>>§block_filters: Option<Arc<NetworkFilters<FlatFiltersStore>>>§last_filter: BlockHash§peer_id_count: u32§peer_ids: Vec<u32>§peers: HashMap<u32, LocalPeerView>§peer_by_service: HashMap<ServiceFlags, Vec<u32>>§max_banscore: u32§address_man: AddressMan§added_peers: Vec<AddedPeerInfo>§node_rx: UnboundedReceiver<NodeNotification>§node_tx: UnboundedSender<NodeNotification>§socks5: Option<Socks5StreamBuilder>§fixed_peer: Option<LocalAddress>§inflight: HashMap<InflightRequests, (u32, Instant)>§inflight_user_requests: HashMap<UserRequest, (u32, Instant, Sender<NodeResponse>)>§last_tip_update: Instant§last_connection: Instant§last_peer_db_dump: Instant§last_block_request: u32§last_get_address_request: Instant§last_send_addresses: Instant§block_sync_avg: Ema§last_feeler: Instant§startup_time: Instant§last_dns_seed_call: Instant§used_fixed_addresses: bool§config: UtreexoNodeConfig§datadir: String§network: Network§kill_signal: Arc<RwLock<bool>>

Auto Trait Implementations§

§

impl<Chain> Freeze for NodeCommon<Chain>
where Chain: Freeze,

§

impl<Chain> !RefUnwindSafe for NodeCommon<Chain>

§

impl<Chain> Send for NodeCommon<Chain>
where Chain: Send,

§

impl<Chain> Sync for NodeCommon<Chain>
where Chain: Sync,

§

impl<Chain> Unpin for NodeCommon<Chain>
where Chain: Unpin,

§

impl<Chain> !UnwindSafe for NodeCommon<Chain>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more