mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 06:14:38 +00:00
Adds bootnodes to chainspec. Handles type correctly
This commit is contained in:
@@ -6,11 +6,11 @@ mod behaviour;
|
||||
mod network_config;
|
||||
mod service;
|
||||
|
||||
pub use libp2p::multiaddr;
|
||||
pub use libp2p::Multiaddr;
|
||||
pub use libp2p::{
|
||||
gossipsub::{GossipsubConfig, GossipsubConfigBuilder},
|
||||
PeerId,
|
||||
};
|
||||
pub use network_config::NetworkConfig;
|
||||
pub use service::Service;
|
||||
pub use types::multiaddr;
|
||||
pub use types::Multiaddr;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::Multiaddr;
|
||||
use libp2p::gossipsub::{GossipsubConfig, GossipsubConfigBuilder};
|
||||
use libp2p::secio;
|
||||
use libp2p::Multiaddr;
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -40,8 +40,11 @@ impl Default for NetworkConfig {
|
||||
}
|
||||
|
||||
impl NetworkConfig {
|
||||
pub fn new() -> Self {
|
||||
NetworkConfig::default()
|
||||
pub fn new(boot_nodes: Vec<Multiaddr>) -> Self {
|
||||
let mut conf = NetworkConfig::default();
|
||||
conf.boot_nodes = boot_nodes;
|
||||
|
||||
conf
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use crate::behaviour::Behaviour;
|
||||
use crate::multiaddr::Protocol;
|
||||
use crate::NetworkConfig;
|
||||
use futures::prelude::*;
|
||||
use libp2p::core::{
|
||||
@@ -7,7 +8,6 @@ use libp2p::core::{
|
||||
transport::boxed::Boxed,
|
||||
upgrade::{InboundUpgradeExt, OutboundUpgradeExt},
|
||||
};
|
||||
use libp2p::multiaddr::Protocol;
|
||||
use libp2p::{core, secio, Transport};
|
||||
use libp2p::{PeerId, Swarm};
|
||||
use slog::{debug, info, warn};
|
||||
|
||||
Reference in New Issue
Block a user