erigon-pulse/cmd/state/commands/check_index.go
ledgerwatch 117838e213
Move compatibility check (#1814)
* Move compatibility check

* Implement Alex's suggestion

* Use root context

* Fix lint

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-26 13:39:34 +01:00

24 lines
547 B
Go

package commands
import (
"github.com/ledgerwatch/turbo-geth/cmd/state/verify"
"github.com/ledgerwatch/turbo-geth/cmd/utils"
"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, _ := utils.RootContext()
return verify.CheckIndex(ctx, chaindata, changeSetBucket, indexBucket)
},
}