2020-04-20 10:35:33 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
2020-05-23 09:19:56 +00:00
|
|
|
"github.com/ledgerwatch/turbo-geth/cmd/state/verify"
|
2020-11-22 21:25:26 +00:00
|
|
|
"github.com/ledgerwatch/turbo-geth/cmd/utils"
|
2020-04-20 10:35:33 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2021-04-19 07:25:26 +00:00
|
|
|
withDatadir(checkIndexCMD)
|
2020-04-20 10:35:33 +00:00
|
|
|
withIndexBucket(checkIndexCMD)
|
|
|
|
withCSBucket(checkIndexCMD)
|
|
|
|
rootCmd.AddCommand(checkIndexCMD)
|
|
|
|
}
|
|
|
|
|
|
|
|
var checkIndexCMD = &cobra.Command{
|
|
|
|
Use: "checkIndex",
|
|
|
|
Short: "Index checker",
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
2021-04-26 12:39:34 +00:00
|
|
|
ctx, _ := utils.RootContext()
|
|
|
|
return verify.CheckIndex(ctx, chaindata, changeSetBucket, indexBucket)
|
2020-04-20 10:35:33 +00:00
|
|
|
},
|
|
|
|
}
|