Skip to content

Commit

Permalink
explicitly set gas limit for geth 1.10 as 0 is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Mar 12, 2024
1 parent 11a020b commit ef62a73
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker/test_env/geth_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit ef62a73

Please sign in to comment.