Unverified Commit 7451fc63 authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub

internal/ethapi: default gas to maxgascap, not max int64 (#21284)

parent 12867d15
...@@ -749,7 +749,10 @@ func (args *CallArgs) ToMessage(globalGasCap uint64) types.Message { ...@@ -749,7 +749,10 @@ func (args *CallArgs) ToMessage(globalGasCap uint64) types.Message {
} }
// Set default gas & gas price if none were set // Set default gas & gas price if none were set
gas := uint64(math.MaxUint64 / 2) gas := globalGasCap
if gas == 0 {
gas = uint64(math.MaxUint64 / 2)
}
if args.Gas != nil { if args.Gas != nil {
gas = uint64(*args.Gas) gas = uint64(*args.Gas)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment