From 5a58344b1c15c083e0175f13d4d7afda8d88e516 Mon Sep 17 00:00:00 2001 From: lash Date: Wed, 14 Nov 2018 20:35:58 +0100 Subject: [PATCH] swarm/storage: Rename parseGCIndexKey to generic key parse name --- swarm/storage/ldbstore.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swarm/storage/ldbstore.go b/swarm/storage/ldbstore.go index f25166b9cf..bd4f6b9162 100644 --- a/swarm/storage/ldbstore.go +++ b/swarm/storage/ldbstore.go @@ -284,7 +284,7 @@ func getGCIdxValue(index *dpaDBIndex, po uint8, addr Address) []byte { return val } -func parseGCIdxKey(key []byte) (byte, []byte) { +func parseIdxKey(key []byte) (byte, []byte) { return key[0], key[1:] } @@ -589,7 +589,7 @@ func (s *LDBStore) CleanGCIndex() error { it.Seek([]byte{keyGCIdx}) var gcDeletes int for it.Valid() { - rowType, _ := parseGCIdxKey(it.Key()) + rowType, _ := parseIdxKey(it.Key()) if rowType != keyGCIdx { break } @@ -639,7 +639,7 @@ func (s *LDBStore) CleanGCIndex() error { } // if it's not keyindex anymore we're done iterating - rowType, chunkHash := parseGCIdxKey(it.Key()) + rowType, chunkHash := parseIdxKey(it.Key()) if rowType != keyIndex { doneIterating = true break