mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
e6c056e666
* rename from Datadir to DataDir (functions and public vars) * rename dataDir to datadir (local variables)
24 lines
541 B
Go
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)
|
|
},
|
|
}
|