Skip to content

Commit 6d1632e

Browse files
committed
Lint
1 parent dab8a8d commit 6d1632e

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

ss/pebbledb/db.go

-20
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,6 @@ func (db *Database) computeMissingRanges(latestVersion int64) error {
431431
// We have a full chunk from (lastHashed+1) .. nextTarget
432432
begin := lastHashed + 1
433433
end := nextTarget
434-
435434
if err := db.computeHashForRange(begin, end); err != nil {
436435
return err
437436
}
@@ -950,25 +949,6 @@ func parseStoreKey(key []byte) (string, error) {
950949
return keyStr[LenPrefixStore : LenPrefixStore+slashIndex], nil
951950
}
952951

953-
// Parses actual key from key with format "s/k:{store}/{actualKey}"
954-
func parseKey(key []byte) ([]byte, error) {
955-
// Convert byte slice to string only once
956-
keyStr := string(key)
957-
958-
if !strings.HasPrefix(keyStr, PrefixStore) {
959-
return nil, fmt.Errorf("not a valid store key")
960-
}
961-
962-
// Find the first occurrence of "/" after the prefix
963-
slashIndex := strings.Index(keyStr[LenPrefixStore:], "/")
964-
if slashIndex == -1 {
965-
return nil, fmt.Errorf("not a valid store key")
966-
}
967-
968-
// Return everything after the first "/" as bytes
969-
return []byte(keyStr[LenPrefixStore+slashIndex+1:]), nil
970-
}
971-
972952
func getMVCCSlice(db *pebble.DB, storeKey string, key []byte, version int64) ([]byte, error) {
973953
// end domain is exclusive, so we need to increment the version by 1
974954
if version < math.MaxInt64 {

ss/util/xor_hasher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (x XorHashCalculator) ComputeHashes() [][]byte {
5555
go func(index int, data chan types.RawSnapshotNode) {
5656
defer wg.Done()
5757
var hashResult []byte
58-
for item := range subsetChan {
58+
for item := range data {
5959
entryHash := x.HashSingle(Serialize(item))
6060
if hashResult == nil {
6161
hashResult = entryHash

0 commit comments

Comments
 (0)