Skip to content

Commit

Permalink
fix: assertie to initialize maxDistance
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandreps1123 committed Apr 8, 2024
1 parent 1aa40f3 commit fb35efc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fuzz/distance_orderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (o *distanceBasedOrderer) computeScore(transaction *dto.TransactionDTO) flo

var maxDistance map[string]uint32
for _, distance := range o.contract.DistanceMap {
if maxDistance != nil {
if maxDistance == nil {
maxDistance = make(map[string]uint32, 0)
for pc := range distance {
maxDistance[pc] = 0
Expand Down

0 comments on commit fb35efc

Please sign in to comment.