Unverified Commit 8bbaf882 authored by Freeman Jiang's avatar Freeman Jiang Committed by GitHub

core/types: add "chainID" field to legacy tx JSON encoding (#27452)

Co-authored-by: 's avatarlightclient <14004106+lightclient@users.noreply.github.com>
parent f3314bb6
......@@ -69,6 +69,9 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) {
enc.V = (*hexutil.Big)(itx.V)
enc.R = (*hexutil.Big)(itx.R)
enc.S = (*hexutil.Big)(itx.S)
if tx.Protected() {
enc.ChainID = (*hexutil.Big)(tx.ChainId())
}
case *AccessListTx:
enc.ChainID = (*hexutil.Big)(itx.ChainID)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment