diff --git a/pkg/core/dao/dao.go b/pkg/core/dao/dao.go index 48a4e5f56..88a0b9981 100644 --- a/pkg/core/dao/dao.go +++ b/pkg/core/dao/dao.go @@ -537,7 +537,7 @@ func (dao *Simple) GetHeaderHashes() ([]util.Uint256, error) { for k := range hashMap { sortedKeys = append(sortedKeys, k) } - sort.Sort(slice(sortedKeys)) + sort.Slice(sortedKeys, func(i, j int) bool { return sortedKeys[i] < sortedKeys[j] }) for _, key := range sortedKeys { hashes = append(hashes[:key], hashMap[key]...) diff --git a/pkg/core/dao/uint32.go b/pkg/core/dao/uint32.go deleted file mode 100644 index d1a79057b..000000000 --- a/pkg/core/dao/uint32.go +++ /dev/null @@ -1,8 +0,0 @@ -package dao - -// slice attaches the methods of Interface to []int, sorting in increasing order. -type slice []uint32 - -func (p slice) Len() int { return len(p) } -func (p slice) Less(i, j int) bool { return p[i] < p[j] } -func (p slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }