Skip to content

Commit 69df6bb

Browse files
authored
core/types: prealloc map in HashDifference as in TxDifference (#32946)
1 parent 11c0fb9 commit 69df6bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/types/transaction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ func TxDifference(a, b Transactions) Transactions {
648648
func HashDifference(a, b []common.Hash) []common.Hash {
649649
keep := make([]common.Hash, 0, len(a))
650650

651-
remove := make(map[common.Hash]struct{})
651+
remove := make(map[common.Hash]struct{}, len(b))
652652
for _, hash := range b {
653653
remove[hash] = struct{}{}
654654
}

0 commit comments

Comments
 (0)