fix build of cli flags (#7377)

This commit is contained in:
Alex Sharov 2023-04-24 17:47:23 +07:00 committed by GitHub
parent c5e7b07de5
commit ca088bd68e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -26,7 +26,7 @@ import (
"github.com/urfave/cli/v2"
"github.com/ledgerwatch/erigon/cmd/evm/internal/t8ntool"
"github.com/ledgerwatch/erigon/cmd/utils"
"github.com/ledgerwatch/erigon/cmd/utils/flags"
"github.com/ledgerwatch/erigon/params"
cli2 "github.com/ledgerwatch/erigon/turbo/cli"
)
@ -63,12 +63,12 @@ var (
Usage: "gas limit for the evm",
Value: 10000000000,
}
PriceFlag = utils.BigFlag{
PriceFlag = flags.BigFlag{
Name: "price",
Usage: "price set for the evm",
Value: new(big.Int),
}
ValueFlag = utils.BigFlag{
ValueFlag = flags.BigFlag{
Name: "value",
Usage: "value set for the evm",
Value: new(big.Int),

View File

@ -36,6 +36,7 @@ import (
"github.com/ledgerwatch/erigon-lib/common/hexutility"
"github.com/ledgerwatch/erigon-lib/kv/kvcfg"
"github.com/ledgerwatch/erigon-lib/kv/memdb"
"github.com/ledgerwatch/erigon/cmd/utils/flags"
"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/log/v3"
"github.com/urfave/cli/v2"
@ -222,8 +223,8 @@ func runCmd(ctx *cli.Context) error {
if genesisConfig.GasLimit != 0 {
initialGas = genesisConfig.GasLimit
}
value, _ := uint256.FromBig(utils.BigFlagValue(ctx, ValueFlag.Name))
gasPrice, _ := uint256.FromBig(utils.BigFlagValue(ctx, PriceFlag.Name))
value, _ := uint256.FromBig(flags.GlobalBig(ctx, ValueFlag.Name))
gasPrice, _ := uint256.FromBig(flags.GlobalBig(ctx, PriceFlag.Name))
runtimeConfig := runtime.Config{
Origin: sender,
State: statedb,