Skip to content

Commit

Permalink
fix: improve selection of DHT peers
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Dec 6, 2021
1 parent a4341a0 commit 4937112
Show file tree
Hide file tree
Showing 35 changed files with 775 additions and 877 deletions.
104 changes: 46 additions & 58 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions applications/tari_base_node/src/command_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ impl CommandHandler {
s.push(format!(
"LAST_SEEN = {}",
Utc::now()
.naive_utc()
.signed_duration_since(dt)
.to_std()
.map(format_duration_basic)
Expand Down
2 changes: 1 addition & 1 deletion common/src/exit_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use thiserror::Error;
/// Enum to show failure information
#[derive(Debug, Clone, Error)]
pub enum ExitCodes {
#[error("There is an error in the wallet configuration: {0}")]
#[error("There is an error in the configuration: {0}")]
ConfigError(String),
#[error("The application exited because an unknown error occurred: {0}. Check the logs for more details.")]
UnknownError(String),
Expand Down
7 changes: 2 additions & 5 deletions comms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@ thiserror = "1.0.26"
tokio = { version = "1.14", features = ["rt-multi-thread", "time", "sync", "signal", "net", "macros", "io-util"] }
tokio-stream = { version = "0.1.7", features = ["sync"] }
tokio-util = { version = "0.6.7", features = ["codec", "compat"] }
tower = "0.4"
tower = {version = "0.4", features = ["util"]}
tracing = "0.1.26"
tracing-futures = "0.2.5"
yamux = "=0.9.0"

# RPC dependencies
tower-make = { version = "0.3.0", optional = true }

# Metrics
tari_metrics = { path = "../infrastructure/metrics" }

Expand All @@ -69,4 +66,4 @@ tari_common = { version = "^0.21", path = "../common", features = ["build"] }
c_integration = []
avx2 = ["tari_crypto/avx2"]
metrics = []
rpc = ["tower-make", "tower/util"]
rpc = ["tower/make", "tower/util"]
7 changes: 3 additions & 4 deletions comms/dht/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ serde_derive = "1.0.90"
serde_repr = "0.1.5"
thiserror = "1.0.26"
tokio = { version = "1.14", features = ["rt", "macros"] }
tower = { version= "0.4", features=["full"] }
tower = { version = "0.4", features = ["full"] }
ttl_cache = "0.5.1"

# tower-filter dependencies
Expand All @@ -49,6 +49,8 @@ tari_test_utils = { version = "^0.21", path = "../../infrastructure/test_utils"

env_logger = "0.7.0"
futures-test = { version = "0.3.5" }
futures-util = "^0.3.1"
lazy_static = "1.4.0"
lmdb-zero = "0.4.4"
tempfile = "3.1.0"
tokio-stream = { version = "0.1.7", features = ["sync"] }
Expand All @@ -57,9 +59,6 @@ clap = "2.33.0"

# tower-filter dependencies
tower-test = { version = "^0.4" }
tokio-test = "^0.4.2"
futures-util = "^0.3.1"
lazy_static = "1.4.0"

[build-dependencies]
tari_common = { version = "^0.21", path = "../../common" }
Expand Down
Loading

0 comments on commit 4937112

Please sign in to comment.