erigon-pulse/cmd/state/commands/regenerate_index.go
b00ris a9f71298aa
Index chunking (#473)
* index generation

* save state

* save state

* save state

* save state

* save state

* save state

* save state

* save state

* fix

* save state

* fix
2020-04-20 11:35:33 +01:00

22 lines
564 B
Go

package commands
import (
"github.com/ledgerwatch/turbo-geth/cmd/state/stateless"
"github.com/spf13/cobra"
)
func init() {
withChaindata(regenerateIndexCmd)
withIndexBucket(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 {
return stateless.RegenerateIndex(chaindata, []byte(indexBucket), []byte(changeSetBucket))
},
}