Skip to content

Commit

Permalink
remove truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing committed Jul 10, 2024
1 parent e5f8017 commit 60ad6e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 52 deletions.
9 changes: 6 additions & 3 deletions cmd/util/cmd/export-json-transactions/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,14 @@ func writeJSONTo(writer io.Writer, jsonData []byte) error {
func ExportTransactions(dataDir string, outputDir string, startHeight uint64, endHeight uint64) error {

// init dependencies
db := common.InitStorage(flagDatadir)
storages := common.InitStorages(db)
db, err := common.InitStoragePebble(flagDatadir)
if err != nil {
return fmt.Errorf("could not init storage: %w", err)
}
defer db.Close()

state, err := common.InitProtocolState(db, storages)
storages := common.InitStoragesPebble(db)
state, err := common.InitProtocolStatePebble(db, storages)
if err != nil {
return fmt.Errorf("could not init protocol state: %w", err)
}
Expand Down
2 changes: 0 additions & 2 deletions cmd/util/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
read_protocol_state "github.com/onflow/flow-go/cmd/util/cmd/read-protocol-state/cmd"
index_er "github.com/onflow/flow-go/cmd/util/cmd/reindex/cmd"
"github.com/onflow/flow-go/cmd/util/cmd/snapshot"
truncate_database "github.com/onflow/flow-go/cmd/util/cmd/truncate-database"
update_commitment "github.com/onflow/flow-go/cmd/util/cmd/update-commitment"
"github.com/onflow/flow-go/cmd/util/cmd/version"
)
Expand Down Expand Up @@ -68,7 +67,6 @@ func addCommands() {
rootCmd.AddCommand(export.Cmd)
rootCmd.AddCommand(checkpoint_list_tries.Cmd)
rootCmd.AddCommand(checkpoint_collect_stats.Cmd)
rootCmd.AddCommand(truncate_database.Cmd)
rootCmd.AddCommand(read_pebble.RootCmd)
rootCmd.AddCommand(read_protocol_state.RootCmd)
rootCmd.AddCommand(ledger_json_exporter.Cmd)
Expand Down
47 changes: 0 additions & 47 deletions cmd/util/cmd/truncate-database/cmd.go

This file was deleted.

0 comments on commit 60ad6e7

Please sign in to comment.