Skip to content

Commit 3cac4f8

Browse files
committed
core/types: prealloc map in HashDifference as in TxDifference ethereum#32946
1 parent 79460e4 commit 3cac4f8

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
@@ -627,7 +627,7 @@ func TxDifference(a, b Transactions) (keep Transactions) {
627627
func HashDifference(a, b []common.Hash) []common.Hash {
628628
keep := make([]common.Hash, 0, len(a))
629629

630-
remove := make(map[common.Hash]struct{})
630+
remove := make(map[common.Hash]struct{}, len(b))
631631
for _, hash := range b {
632632
remove[hash] = struct{}{}
633633
}

0 commit comments

Comments
 (0)