Skip to content

Commit

Permalink
protect against overriding OrigGasPrice
Browse files Browse the repository at this point in the history
  • Loading branch information
giladHaimov committed Jun 18, 2024
1 parent 3223e28 commit 7d17d3d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ func (tx *Transaction) UnmarshalBinary(b []byte) error {
if err != nil {
return err
}
//@lfm RPC invocation
data.OrigGasPrice = data.GasPrice
data.GasPrice = locaFeeMarket.AdjustGasPrice(data.OrigGasPrice, data.Gas, data.Value, len(data.Data))
//@lfm RPC invocation route: adjust tx gas price
if data.OrigGasPrice == nil {
data.OrigGasPrice = data.GasPrice
data.GasPrice = locaFeeMarket.AdjustGasPrice(data.OrigGasPrice, data.Gas, data.Value, len(data.Data))
}
tx.setDecoded(&data, len(b))
return nil
}
Expand Down

0 comments on commit 7d17d3d

Please sign in to comment.