From ef62a73fa36357daec69debdd04091d7cd1a4fa7 Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Tue, 12 Mar 2024 10:21:28 +0100 Subject: [PATCH] explicitly set gas limit for geth 1.10 as 0 is not supported --- docker/test_env/geth_base.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docker/test_env/geth_base.go b/docker/test_env/geth_base.go index 6dc0107f8..00001e82a 100644 --- a/docker/test_env/geth_base.go +++ b/docker/test_env/geth_base.go @@ -104,6 +104,16 @@ func (g *Geth) StartContainer() (blockchain.EVMNetwork, error) { networkConfig.URLs = []string{g.ExternalWsUrl} networkConfig.HTTPURLs = []string{g.ExternalHttpUrl} + comparableVersion, err := GetComparableVersionFromDockerImage(g.GetImageWithVersion()) + if err != nil { + return blockchain.EVMNetwork{}, err + } + + if comparableVersion >= 110 && comparableVersion < 111 { + // Geth v1.10.x will not set it itself if it's set 0, like later versions do + networkConfig.DefaultGasLimit = 9_000_000 + } + g.l.Info().Str("containerName", g.ContainerName). Msg("Started Geth PoS container")