Skip to content

Commit

Permalink
only allow legacy type transactions in eth_sendRawTransaction (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexoscott authored Aug 15, 2024
1 parent 042a3f1 commit 2e6a30b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/rpcdaemon/commands/send_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ func (api *APIImpl) SendRawTransaction(ctx context.Context, encodedTx hexutility
return common.Hash{}, err
}

if txn.Type() != types.LegacyTxType {
return common.Hash{}, errors.New("only legacy transactions are supported")
}

// If the transaction fee cap is already specified, ensure the
// fee of the given transaction is _reasonable_.
if err := checkTxFee(txn.GetPrice().ToBig(), txn.GetGas(), ethconfig.Defaults.RPCTxFeeCap); err != nil {
Expand Down

0 comments on commit 2e6a30b

Please sign in to comment.