Skip to content

Commit 49c2816

Browse files
eth: improve log message (#22146)
* eth: fixed typos * eth: fixed log message
1 parent 79e2174 commit 49c2816

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

eth/handler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,14 +437,14 @@ func (h *handler) BroadcastTransactions(txs types.Transactions, propagate bool)
437437
// Broadcast transactions to a batch of peers not knowing about it
438438
if propagate {
439439
for _, tx := range txs {
440-
peers := h.peers.ethPeersWithoutTransacion(tx.Hash())
440+
peers := h.peers.ethPeersWithoutTransaction(tx.Hash())
441441

442442
// Send the block to a subset of our peers
443443
transfer := peers[:int(math.Sqrt(float64(len(peers))))]
444444
for _, peer := range transfer {
445445
txset[peer] = append(txset[peer], tx.Hash())
446446
}
447-
log.Trace("Broadcast transaction", "hash", tx.Hash(), "recipients", len(peers))
447+
log.Trace("Broadcast transaction", "hash", tx.Hash(), "recipients", len(transfer))
448448
}
449449
for peer, hashes := range txset {
450450
peer.AsyncSendTransactions(hashes)
@@ -453,7 +453,7 @@ func (h *handler) BroadcastTransactions(txs types.Transactions, propagate bool)
453453
}
454454
// Otherwise only broadcast the announcement to peers
455455
for _, tx := range txs {
456-
peers := h.peers.ethPeersWithoutTransacion(tx.Hash())
456+
peers := h.peers.ethPeersWithoutTransaction(tx.Hash())
457457
for _, peer := range peers {
458458
annos[peer] = append(annos[peer], tx.Hash())
459459
}

eth/peerset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ func (ps *peerSet) ethPeersWithoutBlock(hash common.Hash) []*ethPeer {
243243
return list
244244
}
245245

246-
// ethPeersWithoutTransacion retrieves a list of `eth` peers that do not have a
246+
// ethPeersWithoutTransaction retrieves a list of `eth` peers that do not have a
247247
// given transaction in their set of known hashes.
248-
func (ps *peerSet) ethPeersWithoutTransacion(hash common.Hash) []*ethPeer {
248+
func (ps *peerSet) ethPeersWithoutTransaction(hash common.Hash) []*ethPeer {
249249
ps.lock.RLock()
250250
defer ps.lock.RUnlock()
251251

0 commit comments

Comments
 (0)