We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
CalcGasLimit
1 parent 267222d commit acd3eb9Copy full SHA for acd3eb9
core/block_validator.go
@@ -189,10 +189,7 @@ func CalcGasLimit(parent *types.Block) uint64 {
189
at that usage) the amount increased/decreased depends on how far away
190
from parentGasLimit * (2/3) parentGasUsed is.
191
*/
192
- limit := parent.GasLimit() - decay + contrib
193
- if limit < params.MinGasLimit {
194
- limit = params.MinGasLimit
195
- }
+ limit := max(parent.GasLimit()-decay+contrib, params.MinGasLimit)
196
// however, if we're now below the target (TargetGasLimit) we increase the
197
// limit as much as we can (parentGasLimit / 1024 -1)
198
if limit < params.TargetGasLimit {
0 commit comments