Skip to content

Commit

Permalink
Set hashesSet map capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Jun 1, 2022
1 parent 228445c commit 6e02682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dot/sync/block_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type blockQueue struct {
func newBlockQueue(capacity int) *blockQueue {
return &blockQueue{
queue: make(chan *types.BlockData, capacity),
hashesSet: make(map[common.Hash]struct{}),
hashesSet: make(map[common.Hash]struct{}, capacity),
}
}

Expand Down

0 comments on commit 6e02682

Please sign in to comment.