Code fully compiles for processing incoming peers
This commit is contained in:
parent
9c7cf61e1a
commit
65c69f576b
11 changed files with 310 additions and 32 deletions
|
|
@ -52,6 +52,15 @@ pub(crate) struct Peer {
|
|||
pub stats: stats::atomic::PeerStats,
|
||||
}
|
||||
|
||||
impl Peer {
|
||||
pub fn new_live_for_incoming_connection(peer_id: Id20, tx: PeerTx) -> Self {
|
||||
Self {
|
||||
state: PeerStateNoMut(PeerState::Live(LivePeerState::new(peer_id, tx))),
|
||||
stats: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub(crate) enum PeerState {
|
||||
#[default]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue