From e948e6147cbe2365ddadddc643a729a8244f86de Mon Sep 17 00:00:00 2001 From: stringhandler Date: Thu, 12 Dec 2024 16:50:29 +0200 Subject: [PATCH 1/2] chore(release): v0.15.4 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b501f4..823c8c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4626,7 +4626,7 @@ dependencies = [ [[package]] name = "sha_p2pool" -version = "0.15.3" +version = "0.15.4" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 5072a61..fe98688 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "sha_p2pool" -version = "0.15.3" +version = "0.15.4" [dependencies] anyhow = "1.0" From 974d79231a1a0127caf7769fc8ac596b7b47cf1a Mon Sep 17 00:00:00 2001 From: stringhandler Date: Thu, 12 Dec 2024 16:51:20 +0200 Subject: [PATCH 2/2] feat: add address to debug print chain --- src/server/p2p/network.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/server/p2p/network.rs b/src/server/p2p/network.rs index d33333f..7d15479 100644 --- a/src/server/p2p/network.rs +++ b/src/server/p2p/network.rs @@ -2269,10 +2269,14 @@ where S: ShareChain } async fn print_debug_chain_graph(&self) { - self.print_debug_chain_graph_inner(&self.share_chain_random_x, "randomx") - .await; - self.print_debug_chain_graph_inner(&self.share_chain_sha3x, "sha3x") - .await; + if self.config.randomx_enabled { + self.print_debug_chain_graph_inner(&self.share_chain_random_x, "randomx") + .await; + } + if self.config.sha3x_enabled { + self.print_debug_chain_graph_inner(&self.share_chain_sha3x, "sha3x") + .await; + } } async fn print_debug_chain_graph_inner(&self, chain: &S, prefix: &str) { @@ -2299,12 +2303,14 @@ where S: ShareChain for b in blocks { file.write_all( format!( - "B{} [label=\"{} - {} {}{}\"]\n", + "B{} [label=\"{} - {} {}{} {}..{}\"]\n", &b.hash.to_hex()[0..8], &b.height, &b.hash.to_hex()[0..8], if b.verified { "" } else { "UNVERIFIED " }, - formatter.format(b.target_difficulty().as_u64() as f64) + formatter.format(b.target_difficulty().as_u64() as f64), + &b.miner_wallet_address.to_base58()[0..6], + &b.miner_wallet_address.to_base58()[84..] ) .as_bytes(), )