File tree 1 file changed +3
-12
lines changed
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package types
3
3
import (
4
4
"fmt"
5
5
"io"
6
+ "slices"
6
7
7
8
crypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
8
9
@@ -96,25 +97,15 @@ func (s *StoreUpgrades) IsAdded(key string) bool {
96
97
if s == nil {
97
98
return false
98
99
}
99
- for _ , added := range s .Added {
100
- if key == added {
101
- return true
102
- }
103
- }
104
- return false
100
+ return slices .Contains (s .Added , key )
105
101
}
106
102
107
103
// IsDeleted returns true if the given key should be deleted
108
104
func (s * StoreUpgrades ) IsDeleted (key string ) bool {
109
105
if s == nil {
110
106
return false
111
107
}
112
- for _ , d := range s .Deleted {
113
- if d == key {
114
- return true
115
- }
116
- }
117
- return false
108
+ return slices .Contains (s .Deleted , key )
118
109
}
119
110
120
111
// RenamedFrom returns the oldKey if it was renamed
You can’t perform that action at this time.
0 commit comments