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