Commit 45d97c74 authored by Ruslan Akhtariev's avatar Ruslan Akhtariev
Browse files

refactor GatherValuesFromStorePrefix: rename parse function to make it make more sense

parent f055f133
Branches unavailable
No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
......@@ -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.
parseKeyValue := func(_ []byte, value []byte) (T, error) {
parseOnlyValue := func(_ []byte, value []byte) (T, error) {
return parseValue(value)
}
return GatherValuesFromStorePrefixWithKeyParser(storeObj, prefix, parseKeyValue)
return GatherValuesFromStorePrefixWithKeyParser(storeObj, prefix, parseOnlyValue)
}
// GatherValuesFromStorePrefixWithKeyParser is a helper function that gathers values from a given store prefix. While iterating through
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment