Don't clear propagated transactions

This commit is contained in:
Tomasz Drwięga 2016-11-15 11:20:54 +01:00
parent 9857f632d8
commit 8dc7fcbe07

View File

@ -1850,7 +1850,7 @@ impl ChainSync {
/// propagates new transactions to all peers /// propagates new transactions to all peers
pub fn propagate_new_transactions(&mut self, io: &mut SyncIo) -> usize { pub fn propagate_new_transactions(&mut self, io: &mut SyncIo) -> usize {
// Early out of nobody to send to. // Early out if nobody to send to.
if self.peers.is_empty() { if self.peers.is_empty() {
return 0; return 0;
} }
@ -1948,9 +1948,6 @@ impl ChainSync {
trace!(target: "sync", "Bad blocks in the queue, restarting"); trace!(target: "sync", "Bad blocks in the queue, restarting");
self.restart(io); self.restart(io);
} }
for peer_info in self.peers.values_mut() {
peer_info.last_sent_transactions.clear();
}
} }
} }