Expand description
Main file for this blockchain. A node is the central task that runs and handles important events, such as new blocks, peer connection/disconnection, new addresses, etc. A node should not care about peer-specific messages, peers’ll handle things like pings.
Re-exports§
pub use peer_man::AddedPeerInfo;
Modules§
- blocks 🔒
- chain_
selector_ ctx - A module that connects with multiple peers and finds the best chain.
- conn 🔒
- peer_
man 🔒 - running_
ctx - After a node catches-up with the network, we can start listening for new blocks, handing any request our user might make and keep our peers alive. This mode requires way less bandwidth and CPU to run, being bound by the number of blocks found in a given period.
- sync_
ctx - A node that downloads and validates the blockchain.
- user_
req 🔒
Macros§
- periodic_
job 🔒 - If
$interval_secshas passed since$timer, run$whatand reset$timer. - try_
and_ 🔒log - Run a task and log any errors that might occur.
- try_
and_ 🔒warn - Run a task and warn any errors that might occur.
Structs§
- Local
Peer View - Local information kept about each peer
- Node
Common - Utreexo
Node - The main node that operates while florestad is up.
Enums§
- Connection
Kind - The kind of connection we see this peer as.
- Inflight
Requests 🔒 - Node
Notification - Node
Request - Sent from node to peers, usually to request something
- Peer
Status
Constants§
- MAX_
ADDR V2_ ADDRESSES - As per BIP 155, limit the number of addresses to 1,000