Skip to content

Commit

Permalink
chore: remove debug info from get-mempool-state (#3782)
Browse files Browse the repository at this point in the history
Description
---
Cleans up some debug info in `get-mempool-state` command

Motivation and Context
---
Debug info made `get-mempool-state` basically unreadable when txns had many inputs

How Has This Been Tested?
---
Manually
  • Loading branch information
sdbondi authored Feb 1, 2022
1 parent d84e0fa commit fd1692c
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions base_layer/core/src/mempool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Display for StateResponse {
for tx in &self.unconfirmed_pool {
writeln!(
fmt,
" {} Fee: {}, Outputs: {}, Kernels: {}, Inputs: {}, metadata: {} bytes, {}",
" {} Fee: {}, Outputs: {}, Kernels: {}, Inputs: {}, metadata: {} bytes",
tx.first_kernel_excess_sig()
.map(|sig| sig.get_signature().to_hex())
.unwrap_or_else(|| "N/A".to_string()),
Expand All @@ -119,22 +119,6 @@ impl Display for StateResponse {
tx.body.kernels().len(),
tx.body.inputs().len(),
tx.body.sum_metadata_size(),
tx.body
.inputs()
.iter()
.map(|i| {
let sopk = i
.sender_offset_public_key()
.map(|s| s.to_hex())
.unwrap_or_else(|_| "<None>".to_string());
let commit = i
.commitment()
.map(|s| s.to_hex())
.unwrap_or_else(|_| "<None>".to_string());
format!("c: {}, sopk: {}", commit, sopk)
})
.collect::<Vec<_>>()
.join(", "),
)?;
}
writeln!(fmt, "--- Reorg Pool ---")?;
Expand Down

0 comments on commit fd1692c

Please sign in to comment.