Implement skeleton network/sync framework.

This commit is contained in:
Age Manning
2019-03-04 18:31:01 +11:00
parent 3b8f29a914
commit b68adc1ae3
16 changed files with 147 additions and 39 deletions

View File

@@ -5,3 +5,6 @@ authors = ["Age Manning <Age@AgeManning.com>"]
edition = "2018"
[dependencies]
# SigP repository until PR is merged
libp2p = { git = "https://github.com/SigP/rust-libp2p", branch = "gossipsub" }
slog = "2.4.1"

View File

@@ -2,10 +2,11 @@
/// all required libp2p functionality.
///
/// This crate builds and manages the libp2p services required by the beacon node.
extern crate libp2p;
mod service;
mod libp2p_service;
pub use libp2p::{
gossipsub::{GossipsubConfig, GossipsubConfigBuilder},
PeerId,
};
pub use libp2p::{GossipsubConfig, PeerId};
pub use libp2p_service::LibP2PService;
pub use service::Service;

View File

@@ -0,0 +1,11 @@
use slog::debug;
/// The configuration and state of the libp2p components for the beacon node.
pub struct Service {}
impl Service {
pub fn new(log: slog::Logger) -> Self {
debug!(log, "Service starting");
Service {}
}
}