Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
Osmosis_Sync
Commits
45d97c74
Commit
45d97c74
authored
1 year ago
by
Ruslan Akhtariev
Browse files
Options
Download
Email Patches
Plain Diff
refactor GatherValuesFromStorePrefix: rename parse function to make it make more sense
parent
f055f133
Branches unavailable
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
osmoutils/store_helper.go
+2
-2
osmoutils/store_helper.go
with
2 additions
and
2 deletions
+2
-2
osmoutils/store_helper.go
+
2
-
2
View file @
45d97c74
...
...
@@ -33,10 +33,10 @@ func GatherValuesFromStore[T any](storeObj store.KVStore, keyStart []byte, keyEn
func
GatherValuesFromStorePrefix
[
T
any
](
storeObj
store
.
KVStore
,
prefix
[]
byte
,
parseValue
func
([]
byte
)
(
T
,
error
))
([]
T
,
error
)
{
// Replace a callback with the one that takes both key and value
// but ignores the key.
parse
Ke
yValue
:=
func
(
_
[]
byte
,
value
[]
byte
)
(
T
,
error
)
{
parse
Onl
yValue
:=
func
(
_
[]
byte
,
value
[]
byte
)
(
T
,
error
)
{
return
parseValue
(
value
)
}
return
GatherValuesFromStorePrefixWithKeyParser
(
storeObj
,
prefix
,
parse
Ke
yValue
)
return
GatherValuesFromStorePrefixWithKeyParser
(
storeObj
,
prefix
,
parse
Onl
yValue
)
}
// GatherValuesFromStorePrefixWithKeyParser is a helper function that gathers values from a given store prefix. While iterating through
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets