mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
31 lines
567 B
Go
31 lines
567 B
Go
package commands
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/ledgerwatch/turbo-geth/cmd/state/stateless"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
withChaindata(gasLimitsCmd)
|
|
withRemoteDb(gasLimitsCmd)
|
|
rootCmd.AddCommand(gasLimitsCmd)
|
|
}
|
|
|
|
var gasLimitsCmd = &cobra.Command{
|
|
Use: "gasLimits",
|
|
Short: "gasLimits",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
ctx := getContext()
|
|
reporter, err := stateless.NewReporter(ctx, remoteDbAddress)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
fmt.Println("Processing started...")
|
|
reporter.GasLimits(ctx)
|
|
return nil
|
|
},
|
|
}
|