Crate mwc_p2p

Source
Expand description

Networking code to connect to other peers and exchange block, transactions, etc.

Re-exports§

pub use crate::store::PeerData;
pub use crate::store::State;
pub use crate::types::Capabilities;
pub use crate::types::ChainAdapter;
pub use crate::types::Direction;
pub use crate::types::Error;
pub use crate::types::P2PConfig;
pub use crate::types::PeerAddr;
pub use crate::types::PeerInfo;
pub use crate::types::ReasonForBan;
pub use crate::types::Seeding;
pub use crate::types::TxHashSetRead;
pub use crate::types::MAX_BLOCK_HEADERS;
pub use crate::types::MAX_LOCATORS;
pub use crate::types::MAX_PEER_ADDRS;
pub use crate::libp2p_connection::add_new_peer;
pub use crate::libp2p_connection::build_integrity_message;
pub use crate::libp2p_connection::get_libp2p_connections;
pub use crate::libp2p_connection::read_message_data;
pub use crate::libp2p_connection::run_libp2p_node;
pub use crate::libp2p_connection::set_seed_list;

Modules§

handshake
libp2p_connection
Mwc server implementation, glues the different parts of the system (mostly the peer-to-peer server, the blockchain and the transaction pool) and acts as a facade.
msg
Message types that transit over the network and related serialization code.
store
Storage implementation for peer data.
types

Structs§

DummyAdapter
A no-op network adapter used for testing.
Peer
Peers
Server
P2P server implementation, handling bootstrapping to find and connect to peers, receiving connections from other peers and keep track of all of them.

Constants§

SEND_CHANNEL_CAP