Skip to content
Snippets Groups Projects
Commit 9bbf8efd authored by Liu-Cheng Xu's avatar Liu-Cheng Xu Committed by GitHub
Browse files

Only log when the transaction is actually to be propagated (#12158)

The logging before is confusing as it says Propagating but it's not in fact when gossip_enabled is
false. Now it's also consistent with `propagate_transactions` below.
parent 800bc5cd
No related merge requests found
......@@ -425,11 +425,11 @@ impl<B: BlockT + 'static, H: ExHashT> TransactionsHandler<B, H> {
/// Propagate one transaction.
pub fn propagate_transaction(&mut self, hash: &H) {
debug!(target: "sync", "Propagating transaction [{:?}]", hash);
// Accept transactions only when enabled
if !self.gossip_enabled.load(Ordering::Relaxed) {
return
}
debug!(target: "sync", "Propagating transaction [{:?}]", hash);
if let Some(transaction) = self.transaction_pool.transaction(hash) {
let propagated_to = self.do_propagate_transactions(&[(hash.clone(), transaction)]);
self.transaction_pool.on_broadcasted(propagated_to);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment