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

31 lines
562 B
Go
Raw Normal View History

package commands
import (
2019-12-06 07:18:26 +00:00
"fmt"
"github.com/ledgerwatch/turbo-geth/cmd/state/stateless"
"github.com/spf13/cobra"
)
func init() {
withChaindata(gasLimitsCmd)
2019-12-06 07:18:26 +00:00
withRemoteDb(gasLimitsCmd)
rootCmd.AddCommand(gasLimitsCmd)
}
var gasLimitsCmd = &cobra.Command{
Use: "gasLimits",
Short: "gasLimits",
RunE: func(cmd *cobra.Command, args []string) error {
2019-12-06 07:36:21 +00:00
reporter, err := stateless.NewReporter(remoteDbAddress)
2019-12-06 07:18:26 +00:00
if err != nil {
return err
}
2019-12-06 07:36:21 +00:00
ctx := getContext()
2019-12-06 07:18:26 +00:00
fmt.Println("Processing started...")
2019-12-06 07:36:21 +00:00
reporter.GasLimits(ctx)
return nil
},
}