mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
33 lines
622 B
Go
33 lines
622 B
Go
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 {
|
|
reporter, err := stateless.NewReporter(remoteDbAddress)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
ctx, _ := getContext()
|
|
|
|
fmt.Println("Processing started...")
|
|
reporter.StateGrowth1(ctx)
|
|
reporter.StateGrowth2(ctx)
|
|
return nil
|
|
},
|
|
}
|
|
|
|
withChaindata(stateGrowthCmd)
|
|
withRemoteDb(stateGrowthCmd)
|
|
rootCmd.AddCommand(stateGrowthCmd)
|
|
}
|