mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-16 04:56:36 +00:00
internal/ethapi: fix chain ID check to return all non-zero IDs (#25244)
This commit is contained in:
parent
e394d01f2a
commit
ae8ce72022
1 changed files with 1 additions and 1 deletions
|
|
@ -1290,7 +1290,7 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
|
||||||
switch tx.Type() {
|
switch tx.Type() {
|
||||||
case types.LegacyTxType:
|
case types.LegacyTxType:
|
||||||
// if a legacy transaction has an EIP-155 chain id, include it explicitly
|
// if a legacy transaction has an EIP-155 chain id, include it explicitly
|
||||||
if id := tx.ChainId(); id.Sign() == 0 {
|
if id := tx.ChainId(); id.Sign() != 0 {
|
||||||
result.ChainID = (*hexutil.Big)(id)
|
result.ChainID = (*hexutil.Big)(id)
|
||||||
}
|
}
|
||||||
case types.AccessListTxType:
|
case types.AccessListTxType:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue