fixtures: make shred sort order natural

Sorry for the `git pull` jumpscare!
This commit is contained in:
Richard Patel 2022-09-18 01:04:48 +02:00 committed by Richard Patel
parent 0f7098a795
commit 907e65fb6c
1432 changed files with 24 additions and 1 deletions

View File

@ -100,7 +100,7 @@ func dumpShreds(
if !ok || curSlot != slot {
break
}
p := filepath.Join(slotPath, fmt.Sprintf("%s%03d", namePrefix, curIndex))
p := filepath.Join(slotPath, fmt.Sprintf("%s%04d", namePrefix, curIndex))
if err := os.WriteFile(p, iter.Value().Data(), 0644); err != nil {
return err
}

View File

@ -0,0 +1,23 @@
package create
import (
"github.com/certusone/radiance/pkg/blockstore"
"github.com/spf13/cobra"
"k8s.io/klog/v2"
)
var Cmd = cobra.Command{
Use: "create <rocksdb...>",
Short: "Create CAR from RocksDB",
Args: cobra.MaximumNArgs(1),
}
func run(_ *cobra.Command, args []string) {
rocksDB := args[0]
db, err := blockstore.OpenReadOnly(rocksDB)
if err != nil {
klog.Exitf("Failed to open blockstore: %s", err)
}
defer db.Close()
}

Some files were not shown because too many files have changed in this diff Show More