mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-01 02:37:37 +00:00
eth: prealloc seen map in handleTransactions (#35237)
This commit is contained in:
parent
b6e2f13a9a
commit
dd672c6867
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue