mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-07 17:51:14 +03:00
Debug log for block broadcast
This commit is contained in:
parent
fed0bd3ed3
commit
c1be4e2113
1 changed files with 4 additions and 0 deletions
|
@ -265,13 +265,17 @@ impl Server {
|
|||
/// the block.
|
||||
pub fn broadcast_block(&self, b: &core::Block) {
|
||||
let peers = self.all_peers();
|
||||
let mut count = 0;
|
||||
for p in peers.deref() {
|
||||
if p.is_connected() {
|
||||
if let Err(e) = p.send_block(b) {
|
||||
debug!(LOGGER, "Error sending block to peer: {:?}", e);
|
||||
} else {
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
debug!(LOGGER, "Bardcasted block {} to {} peers.", b.header.height, count);
|
||||
}
|
||||
|
||||
/// Broadcasts the provided transaction to all our peers. A peer
|
||||
|
|
Loading…
Add table
Reference in a new issue