good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 278ec717 authored by Martin Holst Swende's avatar Martin Holst Swende
Browse files

internal/ethapi: add back missing check for maxfee < maxPriorityFee

parent deff5056
No related branches found
No related tags found
No related merge requests found
......@@ -120,6 +120,11 @@ func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend) error {
args.GasPrice = (*hexutil.Big)(price)
}
}
} else {
// Both maxPriorityfee and maxFee set by caller. Sanity-check their internal relation
if args.MaxFeePerGas.ToInt().Cmp(args.MaxPriorityFeePerGas.ToInt()) < 0 {
return fmt.Errorf("maxFeePerGas (%v) < maxPriorityFeePerGas (%v)", args.MaxFeePerGas, args.MaxPriorityFeePerGas)
}
}
if args.Value == nil {
args.Value = new(hexutil.Big)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment