Commit 5f92606b authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

eth/api: added root to the receipts

parent 3601320c
...@@ -979,6 +979,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(txHash common.Hash) (ma ...@@ -979,6 +979,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(txHash common.Hash) (ma
} }
fields := map[string]interface{}{ fields := map[string]interface{}{
"root": common.Bytes2Hex(receipt.PostState),
"blockHash": txBlock, "blockHash": txBlock,
"blockNumber": rpc.NewHexNumber(blockIndex), "blockNumber": rpc.NewHexNumber(blockIndex),
"transactionHash": txHash, "transactionHash": txHash,
...@@ -1637,6 +1638,7 @@ type structLogRes struct { ...@@ -1637,6 +1638,7 @@ type structLogRes struct {
Op string `json:"op"` Op string `json:"op"`
Gas *big.Int `json:"gas"` Gas *big.Int `json:"gas"`
GasCost *big.Int `json:"gasCost"` GasCost *big.Int `json:"gasCost"`
Depth int `json:"depth"`
Error error `json:"error"` Error error `json:"error"`
Stack []string `json:"stack"` Stack []string `json:"stack"`
Memory []string `json:"memory"` Memory []string `json:"memory"`
...@@ -1661,6 +1663,7 @@ func formatLogs(structLogs []vm.StructLog) []structLogRes { ...@@ -1661,6 +1663,7 @@ func formatLogs(structLogs []vm.StructLog) []structLogRes {
Op: trace.Op.String(), Op: trace.Op.String(),
Gas: trace.Gas, Gas: trace.Gas,
GasCost: trace.GasCost, GasCost: trace.GasCost,
Depth: trace.Depth,
Error: trace.Err, Error: trace.Err,
Stack: make([]string, len(trace.Stack)), Stack: make([]string, len(trace.Stack)),
Storage: make(map[string]string), Storage: make(map[string]string),
......
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