diff --git a/crates/net/network/src/transactions/mod.rs b/crates/net/network/src/transactions/mod.rs index 44b6faa0e3..4bdbe20123 100644 --- a/crates/net/network/src/transactions/mod.rs +++ b/crates/net/network/src/transactions/mod.rs @@ -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( &mut self,