fix(net): log transaction count instead of bool in broadcast debug log (#22417)

This commit is contained in:
iPLAY888
2026-02-20 15:15:40 +03:00
committed by GitHub
parent 70cab0d163
commit bb1b9ec611

View File

@@ -1236,7 +1236,7 @@ where
msg_builder.push_pooled(pooled_tx);
}
debug!(target: "net::tx", ?peer_id, tx_count = msg_builder.is_empty(), "Broadcasting transaction hashes");
debug!(target: "net::tx", ?peer_id, tx_count = msg_builder.len(), "Broadcasting transaction hashes");
let msg = msg_builder.build();
self.network.send_transactions_hashes(peer_id, msg);
}
@@ -1924,6 +1924,14 @@ impl PooledTransactionsHashesBuilder {
}
}
/// Returns the number of transactions in the builder.
fn len(&self) -> usize {
match self {
Self::Eth66(hashes) => hashes.len(),
Self::Eth68(hashes) => hashes.len(),
}
}
/// Appends all hashes
fn extend<T: SignedTransaction>(
&mut self,