mirror of https://github.com/status-im/op-geth.git
optimism: set chain-ID of pre-bedrock relayed txs
This commit is contained in:
parent
a22cadcf9f
commit
5d616c1481
|
@ -1473,6 +1473,10 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
|
||||||
result.Nonce = hexutil.Uint64(*receipt.DepositNonce)
|
result.Nonce = hexutil.Uint64(*receipt.DepositNonce)
|
||||||
}
|
}
|
||||||
case types.LegacyTxType:
|
case types.LegacyTxType:
|
||||||
|
if v.Sign() == 0 && r.Sign() == 0 && s.Sign() == 0 { // pre-bedrock relayed tx does not have a signature
|
||||||
|
result.ChainID = (*hexutil.Big)(new(big.Int).Set(config.ChainID))
|
||||||
|
break
|
||||||
|
}
|
||||||
// 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)
|
||||||
|
|
Loading…
Reference in New Issue