GetMetadata can return nil

This commit is contained in:
healthykim 2026-02-09 15:04:36 -05:00
parent f8763cbf49
commit 909d38901d

View file

@ -477,8 +477,8 @@ func (h *handler) BroadcastTransactions(txs []common.Hash) {
) )
for _, tx := range txs { for _, tx := range txs {
if meta := h.txpool.GetMetadata(tx); meta != nil {
var directSet map[*ethPeer]struct{} var directSet map[*ethPeer]struct{}
meta := h.txpool.GetMetadata(tx)
switch { switch {
case meta.Type == types.BlobTxType: case meta.Type == types.BlobTxType:
blobTxs++ blobTxs++
@ -503,6 +503,7 @@ func (h *handler) BroadcastTransactions(txs []common.Hash) {
} }
} }
} }
}
for peer, hashes := range txset { for peer, hashes := range txset {
directCount += len(hashes) directCount += len(hashes)