mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
avoid capping warnings for gas set by internal system transactions
This commit is contained in:
parent
783f93b1d7
commit
57e829fae9
1 changed files with 4 additions and 1 deletions
|
|
@ -183,12 +183,15 @@ func (args *TransactionArgs) ToMessage(globalGasCap uint64, baseFee *big.Int) (t
|
||||||
// Set sender address or use zero address if none specified.
|
// Set sender address or use zero address if none specified.
|
||||||
addr := args.from()
|
addr := args.from()
|
||||||
|
|
||||||
|
// Gas set for system calls
|
||||||
|
systemCallGas := (hexutil.Uint64)(uint64(math.MaxUint64 / 2))
|
||||||
|
|
||||||
// Set default gas & gas price if none were set
|
// Set default gas & gas price if none were set
|
||||||
gas := globalGasCap
|
gas := globalGasCap
|
||||||
if gas == 0 {
|
if gas == 0 {
|
||||||
gas = uint64(math.MaxUint64 / 2)
|
gas = uint64(math.MaxUint64 / 2)
|
||||||
}
|
}
|
||||||
if args.Gas != nil {
|
if args.Gas != nil && *args.Gas != systemCallGas {
|
||||||
gas = uint64(*args.Gas)
|
gas = uint64(*args.Gas)
|
||||||
}
|
}
|
||||||
if globalGasCap != 0 && globalGasCap < gas {
|
if globalGasCap != 0 && globalGasCap < gas {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue