Skip to content

Commit

Permalink
node config: always add targets in the same order
Browse files Browse the repository at this point in the history
This prevents an errored change in StylusTargetConfig from a change in the order of targets
  • Loading branch information
tsahee committed Sep 12, 2024
1 parent 849348e commit 370c6f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions execution/gethexec/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"reflect"
"sort"
"sync/atomic"
"testing"

Expand Down Expand Up @@ -59,6 +60,11 @@ func (c *StylusTargetConfig) Validate() error {
for target := range targetsSet {
targets = append(targets, target)
}
sort.Slice(
targets,
func(i, j int) bool {
return targets[i] < targets[j]
})
c.wasmTargets = targets
return nil
}
Expand Down

0 comments on commit 370c6f1

Please sign in to comment.