Adds log support for simulator

This commit is contained in:
Age Manning
2019-12-02 13:52:22 +11:00
parent e954a0ff1d
commit ec77c66a05
4 changed files with 10 additions and 3 deletions

View File

@@ -8,8 +8,10 @@ edition = "2018"
hex = "0.3"
# rust-libp2p is presently being sourced from a Sigma Prime fork of the
# `libp2p/rust-libp2p` repository.
libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "1c1b3ba402eefbd31ad40c561545554ef66b58a7" }
enr = { git = "https://github.com/SigP/rust-libp2p/", rev = "1c1b3ba402eefbd31ad40c561545554ef66b58a7", features = ["serde"] }
libp2p = { path = "../../../sharding/rust-libp2p" }
enr = { path = "../../../sharding/rust-libp2p/misc/enr", features = ["serde"] }
#libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "1c1b3ba402eefbd31ad40c561545554ef66b58a7" }
#enr = { git = "https://github.com/SigP/rust-libp2p/", rev = "1c1b3ba402eefbd31ad40c561545554ef66b58a7", features = ["serde"] }
types = { path = "../../eth2/types" }
serde = "1.0.102"
serde_derive = "1.0.102"

View File

@@ -91,7 +91,7 @@ impl<TSubstream> Discovery<TSubstream> {
debug!(
log,
"Adding node to routing table";
"Node ID" => format!("{}",
"node_id" => format!("{}",
bootnode_enr.node_id())
);
discovery.add_enr(bootnode_enr);

View File

@@ -14,3 +14,4 @@ parking_lot = "0.9.0"
futures = "0.1.29"
tokio = "0.1.22"
eth1_test_rig = { path = "../eth1_test_rig" }
env_logger = "0.7.1"

View File

@@ -21,6 +21,7 @@
mod checks;
mod local_network;
use env_logger::{Builder, Env};
use eth1_test_rig::GanacheEth1Instance;
use futures::{future, stream, Future, Stream};
use local_network::LocalNetwork;
@@ -34,6 +35,9 @@ use types::MinimalEthSpec;
pub type E = MinimalEthSpec;
fn main() {
// Debugging output for libp2p and external crates.
Builder::from_env(Env::default()).init();
let nodes = 4;
let validators_per_node = 20;
let log_level = "debug";