mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
add flag rpc-gascap and set RPCGasCap to 50M (#664)
* add gas cap flag * default gas cap to 50m * rpc-gascap
This commit is contained in:
parent
47d27fed3b
commit
22c54206bd
5 changed files with 8 additions and 3 deletions
|
|
@ -144,6 +144,7 @@ var (
|
|||
|
||||
rpcFlags = []cli.Flag{
|
||||
utils.RPCEnabledFlag,
|
||||
utils.RPCGlobalGasCapFlag,
|
||||
utils.RPCListenAddrFlag,
|
||||
utils.RPCPortFlag,
|
||||
utils.RPCHttpWriteTimeoutFlag,
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ var AppHelpFlagGroups = []flagGroup{
|
|||
Name: "API AND CONSOLE",
|
||||
Flags: []cli.Flag{
|
||||
utils.RPCEnabledFlag,
|
||||
utils.RPCGlobalGasCapFlag,
|
||||
utils.RPCListenAddrFlag,
|
||||
utils.RPCPortFlag,
|
||||
utils.RPCHttpWriteTimeoutFlag,
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ var (
|
|||
Usage: "Record information useful for VM and contract debugging",
|
||||
}
|
||||
RPCGlobalGasCapFlag = cli.Uint64Flag{
|
||||
Name: "rpc.gascap",
|
||||
Name: "rpc-gascap",
|
||||
Usage: "Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite)",
|
||||
Value: ethconfig.Defaults.RPCGasCap,
|
||||
}
|
||||
|
|
@ -1245,6 +1245,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
|||
if ctx.GlobalIsSet(RPCGlobalTxFeeCap.Name) {
|
||||
cfg.RPCTxFeeCap = ctx.GlobalFloat64(RPCGlobalTxFeeCap.Name)
|
||||
}
|
||||
if ctx.GlobalIsSet(RPCGlobalGasCapFlag.Name) {
|
||||
cfg.RPCGasCap = ctx.GlobalUint64(RPCGlobalGasCapFlag.Name)
|
||||
}
|
||||
if ctx.GlobalIsSet(ExtraDataFlag.Name) {
|
||||
cfg.ExtraData = []byte(ctx.GlobalString(ExtraDataFlag.Name))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ var Defaults = Config{
|
|||
GasPrice: big.NewInt(0.25 * params.Shannon),
|
||||
|
||||
TxPool: core.DefaultTxPoolConfig,
|
||||
RPCGasCap: 25000000,
|
||||
RPCGasCap: 50000000,
|
||||
GPO: FullNodeGPO,
|
||||
RPCTxFeeCap: 1, // 1 ether
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ type peer struct {
|
|||
|
||||
knownVote mapset.Set // Set of BFT Vote known to be known by this peer
|
||||
knownTimeout mapset.Set // Set of BFT timeout known to be known by this peer
|
||||
knownSyncInfo mapset.Set // Set of BFT Sync Info known to be known by this peer`
|
||||
knownSyncInfo mapset.Set // Set of BFT Sync Info known to be known by this peer
|
||||
}
|
||||
|
||||
func newPeer(version int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {
|
||||
|
|
|
|||
Loading…
Reference in a new issue