mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-18 05:56:37 +00:00
internal/ethapi: default gas to maxgascap, not max int64 (#21284)
This commit is contained in:
parent
12867d152c
commit
7451fc637d
1 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue