erigon-pulse/cmd/state/commands/gas_limits.go
Alex Sharov 33308dd5c2
State analytic less memory and checkpoints (#299)
* added prefix tree to analyses to reduce memory usage
* make new partition every day
* merge concepts of reporter and snapshot
* tests for .FirstKey() and .NextKey()
2020-01-07 09:27:19 +07:00

31 lines
585 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()
db, err := connectRemoteDb(ctx, remoteDbAddress)
if err != nil {
return err
}
fmt.Println("Processing started...")
stateless.NewGasLimitReporter(ctx, db).GasLimits(ctx)
return nil
},
}