From 8baab09637cfb483b6df2bdb05113abbfac5cfb0 Mon Sep 17 00:00:00 2001 From: ia Date: Tue, 6 Nov 2018 12:04:51 -0500 Subject: [PATCH] problem: v,r,s tx values not included in RPC Tx solution: include them Fixes #684 --- eth/api.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eth/api.go b/eth/api.go index 97195cf26..59b08ee23 100644 --- a/eth/api.go +++ b/eth/api.go @@ -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 @@ -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()), @@ -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 }