mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
b3f1915d09
* change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * change_set_dup * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * working version * aa * aa * aa * aa * aa * aa * aa * aa * aa * aa * aa * aa * aa * aa * aa * squash * squash * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * history_early_stop * history_early_stop * vmConfig with ReadOnly false * auto_increment * auto_increment * rebase master Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
55 lines
1.8 KiB
Go
55 lines
1.8 KiB
Go
package commands
|
|
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/common/dbutils"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
chaindata string
|
|
statsfile string
|
|
snapshotFile string
|
|
block uint64
|
|
privateApiAddr string
|
|
changeSetBucket string
|
|
indexBucket string
|
|
snapshotMode string
|
|
snapshotDir string
|
|
)
|
|
|
|
func must(err error) {
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
func withBlock(cmd *cobra.Command) {
|
|
cmd.Flags().Uint64Var(&block, "block", 1, "specifies a block number for operation")
|
|
}
|
|
func withSnapshotData(cmd *cobra.Command) {
|
|
cmd.Flags().StringVar(&snapshotMode, "snapshotMode", "", "set of snapshots to use")
|
|
cmd.Flags().StringVar(&snapshotDir, "snapshotDir", "", "snapshot dir")
|
|
}
|
|
|
|
func withChaindata(cmd *cobra.Command) {
|
|
cmd.Flags().StringVar(&chaindata, "chaindata", "chaindata", "path to the chaindata file used as input to analysis")
|
|
must(cmd.MarkFlagFilename("chaindata", ""))
|
|
}
|
|
|
|
func withStatsfile(cmd *cobra.Command) {
|
|
cmd.Flags().StringVar(&statsfile, "statsfile", "stateless.csv", "path where to write the stats file")
|
|
must(cmd.MarkFlagFilename("statsfile", "csv"))
|
|
}
|
|
|
|
func withPrivateApi(cmd *cobra.Command) {
|
|
cmd.Flags().StringVar(&privateApiAddr, "private.api.addr", "", "private api network address, for example: 127.0.0.1:9090, empty string means not to start the listener. do not expose to public network. serves remote database interface")
|
|
}
|
|
|
|
func withCSBucket(cmd *cobra.Command) {
|
|
cmd.Flags().StringVar(&changeSetBucket, "changeset-bucket", dbutils.AccountChangeSetBucket, dbutils.AccountChangeSetBucket+" for account and "+dbutils.StorageChangeSetBucket+" for storage")
|
|
}
|
|
|
|
func withIndexBucket(cmd *cobra.Command) {
|
|
cmd.Flags().StringVar(&indexBucket, "index-bucket", dbutils.AccountsHistoryBucket, dbutils.AccountsHistoryBucket+" for account and "+dbutils.StorageHistoryBucket+" for storage")
|
|
}
|