Complete moving network logc into beacon node

This commit is contained in:
Age Manning
2019-04-03 16:33:12 +11:00
parent dd3a4f0b43
commit c1d609902a
8 changed files with 23 additions and 18 deletions

View File

@@ -4,6 +4,10 @@ use serde_derive::{Deserialize, Serialize};
use types::multiaddr::{Error as MultiaddrError, Multiaddr};
//use std::time::Duration;
/// The beacon node topic string to subscribe to.
pub const BEACON_PUBSUB_TOPIC: &str = "beacon_node";
pub const SHARD_TOPIC_PREFIX: &str = "attestations"; // single topic for all attestation for the moment.
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(default)]
/// Network configuration for lighthouse.
@@ -22,10 +26,6 @@ pub struct Config {
pub client_version: String,
/// List of extra topics to initially subscribe to as strings.
pub topics: Vec<String>,
/// Shard pubsub topic prefix.
pub shard_prefix: String,
/// The main beacon chain topic to subscribe to.
pub beacon_chain_topic: String,
}
impl Default for Config {
@@ -41,8 +41,6 @@ impl Default for Config {
boot_nodes: vec![],
client_version: version::version(),
topics: Vec::new(),
beacon_chain_topic: String::from("beacon_chain"),
shard_prefix: String::from("attestations"), // single topic for all attestation for the moment.
}
}
}