Skip to content

Commit

Permalink
internal/ethapi: default gas to maxgascap, not max int64 (ethereum#21284
Browse files Browse the repository at this point in the history
)
  • Loading branch information
holiman authored Jul 2, 2020
1 parent 12867d1 commit 7451fc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,10 @@ func (args *CallArgs) ToMessage(globalGasCap uint64) types.Message {
}

// 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 {
gas = uint64(*args.Gas)
}
Expand Down

0 comments on commit 7451fc6

Please sign in to comment.