Skipping log when there are no transactions were sent (#2045)

This commit is contained in:
Tomasz Drwięga 2016-09-03 01:33:34 +02:00 committed by Arkadiy Paronyan
parent e0feaa9d4d
commit c0b097832b

View File

@ -1505,11 +1505,13 @@ impl ChainSync {
// Send RLPs // Send RLPs
let sent = lucky_peers.len(); let sent = lucky_peers.len();
if sent > 0 {
for (peer_id, rlp) in lucky_peers.into_iter() { for (peer_id, rlp) in lucky_peers.into_iter() {
self.send_packet(io, peer_id, TRANSACTIONS_PACKET, rlp); self.send_packet(io, peer_id, TRANSACTIONS_PACKET, rlp);
} }
trace!(target: "sync", "Sent up to {} transactions to {} peers.", transactions.len(), sent); trace!(target: "sync", "Sent up to {} transactions to {} peers.", transactions.len(), sent);
}
sent sent
} }