tycho-network 0.3.7

A peer-to-peer networking library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::sync::Arc;

use crate::types::{PeerId, PeerInfo};

pub fn make_peer_info_stub(id: PeerId) -> Arc<PeerInfo> {
    Arc::new(PeerInfo {
        id,
        address_list: Default::default(),
        created_at: 0,
        expires_at: u32::MAX,
        signature: Box::new([0; 64]),
    })
}