erigon-pulse/cmd/state/commands/state_growth.go

33 lines
619 B
Go
Raw Normal View History

package commands
import (
"fmt"
"github.com/ledgerwatch/turbo-geth/cmd/state/stateless"
"github.com/spf13/cobra"
)
func init() {
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)
if err != nil {
return err
}
2019-12-06 07:36:21 +00:00
ctx := getContext()
fmt.Println("Processing started...")
reporter.StateGrowth1(ctx)
reporter.StateGrowth2(ctx)
return nil
},
}
withChaindata(stateGrowthCmd)
withRemoteDb(stateGrowthCmd)
rootCmd.AddCommand(stateGrowthCmd)
}