Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 435218f

Browse files
authored
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.
1 parent 7c1a39f commit 435218f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/network/src/transactions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,11 @@ impl<B: BlockT + 'static, H: ExHashT> TransactionsHandler<B, H> {
425425

426426
/// Propagate one transaction.
427427
pub fn propagate_transaction(&mut self, hash: &H) {
428-
debug!(target: "sync", "Propagating transaction [{:?}]", hash);
429428
// Accept transactions only when enabled
430429
if !self.gossip_enabled.load(Ordering::Relaxed) {
431430
return
432431
}
432+
debug!(target: "sync", "Propagating transaction [{:?}]", hash);
433433
if let Some(transaction) = self.transaction_pool.transaction(hash) {
434434
let propagated_to = self.do_propagate_transactions(&[(hash.clone(), transaction)]);
435435
self.transaction_pool.on_broadcasted(propagated_to);

0 commit comments

Comments
 (0)