From dd672c6867b4a5f38a90537dbbe237a06d31d048 Mon Sep 17 00:00:00 2001 From: cui Date: Wed, 1 Jul 2026 10:34:08 +0800 Subject: [PATCH] eth: prealloc seen map in handleTransactions (#35237) --- eth/handler_eth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/handler_eth.go b/eth/handler_eth.go index 8704a86af4..7922687e0c 100644 --- a/eth/handler_eth.go +++ b/eth/handler_eth.go @@ -89,7 +89,7 @@ func (h *ethHandler) Handle(peer *eth.Peer, packet eth.Packet) error { // handleTransactions marks all given transactions as known to the peer // and performs basic validations. func handleTransactions(peer *eth.Peer, list []*types.Transaction, directBroadcast bool) error { - seen := make(map[common.Hash]struct{}) + seen := make(map[common.Hash]struct{}, len(list)) for _, tx := range list { if tx.Type() == types.BlobTxType { if directBroadcast {