2019-11-25 13:46:36 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
2019-12-04 10:05:35 +00:00
|
|
|
"fmt"
|
|
|
|
|
2019-11-25 13:46:36 +00:00
|
|
|
"github.com/ledgerwatch/turbo-geth/cmd/state/stateless"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2019-12-03 09:55:15 +00:00
|
|
|
stateGrowthCmd := &cobra.Command{
|
|
|
|
Use: "stateGrowth",
|
|
|
|
Short: "stateGrowth",
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
2019-12-04 10:10:42 +00:00
|
|
|
reporter, err := stateless.NewReporter(remoteDbAddress)
|
2019-12-03 09:55:15 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2019-12-06 07:36:21 +00:00
|
|
|
ctx := getContext()
|
2019-12-04 10:05:35 +00:00
|
|
|
|
|
|
|
fmt.Println("Processing started...")
|
2019-12-05 10:32:26 +00:00
|
|
|
reporter.StateGrowth1(ctx)
|
|
|
|
reporter.StateGrowth2(ctx)
|
2019-12-03 09:55:15 +00:00
|
|
|
return nil
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2019-11-25 13:46:36 +00:00
|
|
|
withChaindata(stateGrowthCmd)
|
2019-12-03 09:55:15 +00:00
|
|
|
withRemoteDb(stateGrowthCmd)
|
|
|
|
rootCmd.AddCommand(stateGrowthCmd)
|
2019-11-25 13:46:36 +00:00
|
|
|
}
|