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/generate"
|
2020-04-20 10:35:33 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
withChaindata(regenerateIndexCmd)
|
|
|
|
withCSBucket(regenerateIndexCmd)
|
|
|
|
rootCmd.AddCommand(regenerateIndexCmd)
|
|
|
|
}
|
|
|
|
|
|
|
|
var regenerateIndexCmd = &cobra.Command{
|
|
|
|
Use: "regenerateIndex",
|
|
|
|
Short: "Generate index for accounts/storage based on changesets",
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
2020-08-10 23:55:32 +00:00
|
|
|
return generate.RegenerateIndex(chaindata, changeSetBucket)
|
2020-04-20 10:35:33 +00:00
|
|
|
},
|
|
|
|
}
|