mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Merge pull request #421 from karlonovak/master
avoid capping warnings for gas set by internal system transactions
This commit is contained in:
commit
edd21b3950
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.
|
||||
addr := args.from()
|
||||
|
||||
// Gas set for system calls
|
||||
systemCallGas := (hexutil.Uint64)(uint64(math.MaxUint64 / 2))
|
||||
|
||||
// Set default gas & gas price if none were set
|
||||
gas := globalGasCap
|
||||
if gas == 0 {
|
||||
gas = uint64(math.MaxUint64 / 2)
|
||||
}
|
||||
if args.Gas != nil {
|
||||
if args.Gas != nil && *args.Gas != systemCallGas {
|
||||
gas = uint64(*args.Gas)
|
||||
}
|
||||
if globalGasCap != 0 && globalGasCap < gas {
|
||||
|
|
|
|||
Loading…
Reference in a new issue