This commit is contained in:
rayoo 2026-07-17 21:52:57 -07:00 committed by GitHub
commit 9bd3af351a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -201,6 +201,9 @@ func (args *TransactionArgs) setFeeDefaults(ctx context.Context, b Backend, head
if args.GasPrice != nil && args.AuthorizationList != nil { if args.GasPrice != nil && args.AuthorizationList != nil {
return errors.New("both gasPrice and authorizationList specified") 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. // 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 // 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 // other tx values. See https://github.com/ethereum/go-ethereum/pull/23274

View file

@ -224,6 +224,13 @@ func TestSetFeeDefaults(t *testing.T) {
nil, nil,
errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified"), 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", "fill maxFeePerBlobGas",
"cancun", "cancun",