mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
internal/ethapi: reject gasPrice with blob hashes
This commit is contained in:
parent
111e7b8b48
commit
15a7af3fa1
2 changed files with 10 additions and 0 deletions
|
|
@ -201,6 +201,9 @@ func (args *TransactionArgs) setFeeDefaults(ctx context.Context, b Backend, head
|
|||
if args.GasPrice != nil && args.AuthorizationList != nil {
|
||||
return errors.New("both gasPrice and authorizationList specified")
|
||||
}
|
||||
if args.GasPrice != nil && args.BlobHashes != nil {
|
||||
return errors.New("both gasPrice and blobVersionedHashes specified")
|
||||
}
|
||||
// If the tx has completely specified a fee mechanism, no default is needed.
|
||||
// This allows users who are not yet synced past London to get defaults for
|
||||
// other tx values. See https://github.com/ethereum/go-ethereum/pull/23274
|
||||
|
|
|
|||
|
|
@ -224,6 +224,13 @@ func TestSetFeeDefaults(t *testing.T) {
|
|||
nil,
|
||||
errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified"),
|
||||
},
|
||||
{
|
||||
"set gas price and blob hashes",
|
||||
"cancun",
|
||||
&TransactionArgs{GasPrice: fortytwo, BlobHashes: []common.Hash{{0x01}}},
|
||||
nil,
|
||||
errors.New("both gasPrice and blobVersionedHashes specified"),
|
||||
},
|
||||
{
|
||||
"fill maxFeePerBlobGas",
|
||||
"cancun",
|
||||
|
|
|
|||
Loading…
Reference in a new issue