We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 385ac5a commit cd82f06Copy full SHA for cd82f06
services/horizon/internal/actions/orderbook.go
@@ -2,6 +2,7 @@ package actions
2
3
import (
4
"net/http"
5
+ "slices"
6
7
protocol "github.com/stellar/go/protocols/horizon"
8
"github.com/stellar/go/services/horizon/internal/context"
@@ -24,17 +25,7 @@ type OrderBookResponse struct {
24
25
}
26
27
func priceLevelsEqual(a, b []protocol.PriceLevel) bool {
- if len(a) != len(b) {
28
- return false
29
- }
30
-
31
- for i := range a {
32
- if a[i] != b[i] {
33
34
35
36
37
- return true
+ return slices.Equal(a, b)
38
39
40
// Equals returns true if the OrderBookResponse is equal to `other`
0 commit comments