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() {
|
|
|
|
withChaindata(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 {
|
2020-11-22 21:25:26 +00:00
|
|
|
return verify.CheckIndex(utils.RootContext(), chaindata, changeSetBucket, indexBucket)
|
2020-04-20 10:35:33 +00:00
|
|
|
},
|
|
|
|
}
|