erigon-pulse/cmd/state/commands/check_index.go
Alex Sharov 1e3228124a
Move cli root context to erigon-lib (#3294)
* save

* save

* save
2022-01-19 10:49:07 +07:00

24 lines
541 B
Go

package commands
import (
"github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon/cmd/state/verify"
"github.com/spf13/cobra"
)
func init() {
withDatadir(checkIndexCMD)
withIndexBucket(checkIndexCMD)
withCSBucket(checkIndexCMD)
rootCmd.AddCommand(checkIndexCMD)
}
var checkIndexCMD = &cobra.Command{
Use: "checkIndex",
Short: "Index checker",
RunE: func(cmd *cobra.Command, args []string) error {
ctx, _ := common.RootContext()
return verify.CheckIndex(ctx, chaindata, changeSetBucket, indexBucket)
},
}