Skip to content

Commit

Permalink
Micro-optimization for paths search (stellar#4125)
Browse files Browse the repository at this point in the history
Leftover from stellar#4105
  • Loading branch information
2opremio authored Dec 4, 2021
1 parent aa089ae commit 01ba901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exp/orderbook/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (graph *OrderBookGraph) FindFixedPaths(
maxAssetsPerPath int,
includePools bool,
) ([]Path, uint32, error) {
target := map[int32]bool{}
target := make(map[int32]bool, len(destinationAssets))
for _, destinationAsset := range destinationAssets {
destinationAssetString := destinationAsset.String()
target[graph.assetStringToID[destinationAssetString]] = true
Expand Down

0 comments on commit 01ba901

Please sign in to comment.