Skip to content

Commit

Permalink
#4222: define length of map at declaration on asset filter
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed May 6, 2022
1 parent 7b77d7b commit 65405b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/horizon/internal/ingest/filters/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (f *assetFilter) assetMatchedFilter(asset *xdr.Asset) bool {
}

func listToMap(list []string) map[string]struct{} {
set := make(map[string]struct{})
set := make(map[string]struct{}, len(list))
for i := 0; i < len(list); i++ {
set[list[i]] = struct{}{}
}
Expand Down

0 comments on commit 65405b9

Please sign in to comment.