Skip to content

Commit

Permalink
Removed duplication of FIRE BLOCK just to silence the payload
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Jan 30, 2024
1 parent 3e09c7b commit 9443e02
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions src/polling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,29 +171,22 @@ impl Polling {
};

let encoded: Block = b.try_into()?;

if self.quiet {
println!(
"FIRE BLOCK {} {} {} {} {} {}",
block_num,
hex::encode(block_hash),
parent_num,
hex::encode(parent_hash),
lib,
timestamp
);
let block_payload = if self.quiet {
"<trimmed>".to_string()
} else {
println!(
"FIRE BLOCK {} {} {} {} {} {} {}",
block_num,
hex::encode(block_hash),
parent_num,
hex::encode(parent_hash),
lib,
timestamp,
general_purpose::STANDARD.encode(encoded.encode_to_vec())
);
}
general_purpose::STANDARD.encode(encoded.encode_to_vec())
};

println!(
"FIRE BLOCK {} {} {} {} {} {} {}",
block_num,
hex::encode(block_hash),
parent_num,
hex::encode(parent_hash),
lib,
timestamp,
block_payload
);

Ok(())
}
Expand Down

0 comments on commit 9443e02

Please sign in to comment.