Skip to content

Commit

Permalink
internal/ethapi: fix issue with yparity
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Jul 19, 2023
1 parent 2f6717c commit 4217442
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1413,15 +1413,17 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber

case types.AccessListTxType:
al := tx.AccessList()
yparity := hexutil.Uint64(v.Sign())
result.Accesses = &al
result.ChainID = (*hexutil.Big)(tx.ChainId())
result.YParity = (*hexutil.Uint64)(&v)
result.YParity = &yparity

case types.DynamicFeeTxType:
al := tx.AccessList()
yparity := hexutil.Uint64(v.Sign())
result.Accesses = &al
result.ChainID = (*hexutil.Big)(tx.ChainId())
result.YParity = (*hexutil.Uint64)(&v)
result.YParity = &yparity
result.GasFeeCap = (*hexutil.Big)(tx.GasFeeCap())
result.GasTipCap = (*hexutil.Big)(tx.GasTipCap())
// if the transaction has been mined, compute the effective gas price
Expand Down

0 comments on commit 4217442

Please sign in to comment.