From 4c4593bd05f28b829c0797a6aa52d50e22b12a24 Mon Sep 17 00:00:00 2001 From: DarianShawn <103929061+DarianShawn@users.noreply.github.com> Date: Tue, 24 May 2022 10:49:16 +0800 Subject: [PATCH] Use block-gas-target flag in building block (#65) --- command/server/params.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/command/server/params.go b/command/server/params.go index a0589c2b3b..2dfb6a8279 100644 --- a/command/server/params.go +++ b/command/server/params.go @@ -142,8 +142,15 @@ func (p *serverParams) setRawJSONRPCAddress(jsonRPCAddress string) { } func (p *serverParams) generateConfig() *server.Config { + chainCfg := p.genesisConfig + + // Replace block gas limit + if p.blockGasTarget > 0 { + chainCfg.Params.BlockGasTarget = p.blockGasTarget + } + return &server.Config{ - Chain: p.genesisConfig, + Chain: chainCfg, JSONRPC: &server.JSONRPC{ JSONRPCAddr: p.jsonRPCAddress, AccessControlAllowOrigin: p.corsAllowedOrigins,