Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Merge branch 'fix/vrs'
Browse files Browse the repository at this point in the history
  • Loading branch information
whilei committed Nov 8, 2018
2 parents ad32ce2 + 8baab09 commit be43774
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,9 @@ type RPCTransaction struct {
Value *rpc.HexNumber `json:"value"`
ReplayProtected bool `json:"replayProtected"`
ChainId *big.Int `json:"chainId,omitempty"`
V *rpc.HexNumber `json:"v"`
R *rpc.HexNumber `json:"r"`
S *rpc.HexNumber `json:"s"`
}

// newRPCPendingTransaction returns a pending transaction that will serialize to the RPC representation
Expand Down Expand Up @@ -956,6 +959,8 @@ func newRPCTransactionFromBlockIndex(b *types.Block, txIndex int) (*RPCTransacti
}
from, _ := types.Sender(signer, tx)

v, r, s := tx.RawSignatureValues()

return &RPCTransaction{
BlockHash: b.Hash(),
BlockNumber: rpc.NewHexNumber(b.Number()),
Expand All @@ -970,6 +975,9 @@ func newRPCTransactionFromBlockIndex(b *types.Block, txIndex int) (*RPCTransacti
Value: rpc.NewHexNumber(tx.Value()),
ReplayProtected: protected,
ChainId: chainId,
V: rpc.NewHexNumber(v),
R: rpc.NewHexNumber(r),
S: rpc.NewHexNumber(s),
}, nil
}

Expand Down

0 comments on commit be43774

Please sign in to comment.