Browse Source

small cleanups

main
mleku 3 months ago
parent
commit
c31cada271
No known key found for this signature in database
  1. 1
      pkg/database/export.go
  2. 4
      pkg/database/get-serials-by-range.go
  3. 2
      pkg/database/import.go

1
pkg/database/export.go

@ -108,5 +108,4 @@ func (d *D) Export(c context.Context, w io.Writer, pubkeys ...[]byte) {
} }
} }
} }
return
} }

4
pkg/database/get-serials-by-range.go

@ -31,9 +31,9 @@ func (d *D) GetSerialsByRange(idx Range) (
for it.Seek(endBoundary); it.Valid(); it.Next() { for it.Seek(endBoundary); it.Valid(); it.Next() {
item := it.Item() item := it.Item()
var key []byte var key []byte
key = item.Key() key = item.Key()[:len(key)-5]
if bytes.Compare( if bytes.Compare(
key[:len(key)-5], idx.Start, key, idx.Start,
) < 0 { ) < 0 {
// didn't find it within the timestamp range // didn't find it within the timestamp range
return return

2
pkg/database/import.go

@ -83,6 +83,4 @@ func (d *D) Import(rr io.Reader) {
// Help garbage collection // Help garbage collection
tmp = nil tmp = nil
}() }()
return
} }

Loading…
Cancel
Save