transactionRoot -> transactionsRoot

pull/619/head
Taylor Gerring 10 years ago
parent 85ebbc9aa5
commit f89baa73e5
  1. 6
      rpc/responses.go
  2. 56
      rpc/responses_test.go

@ -16,7 +16,7 @@ type BlockRes struct {
Nonce *hexdata `json:"nonce"` Nonce *hexdata `json:"nonce"`
Sha3Uncles *hexdata `json:"sha3Uncles"` Sha3Uncles *hexdata `json:"sha3Uncles"`
LogsBloom *hexdata `json:"logsBloom"` LogsBloom *hexdata `json:"logsBloom"`
TransactionRoot *hexdata `json:"transactionRoot"` TransactionRoot *hexdata `json:"transactionsRoot"`
StateRoot *hexdata `json:"stateRoot"` StateRoot *hexdata `json:"stateRoot"`
Miner *hexdata `json:"miner"` Miner *hexdata `json:"miner"`
Difficulty *hexnum `json:"difficulty"` Difficulty *hexnum `json:"difficulty"`
@ -40,7 +40,7 @@ func (b *BlockRes) MarshalJSON() ([]byte, error) {
Nonce *hexdata `json:"nonce"` Nonce *hexdata `json:"nonce"`
Sha3Uncles *hexdata `json:"sha3Uncles"` Sha3Uncles *hexdata `json:"sha3Uncles"`
LogsBloom *hexdata `json:"logsBloom"` LogsBloom *hexdata `json:"logsBloom"`
TransactionRoot *hexdata `json:"transactionRoot"` TransactionRoot *hexdata `json:"transactionsRoot"`
StateRoot *hexdata `json:"stateRoot"` StateRoot *hexdata `json:"stateRoot"`
Miner *hexdata `json:"miner"` Miner *hexdata `json:"miner"`
Difficulty *hexnum `json:"difficulty"` Difficulty *hexnum `json:"difficulty"`
@ -83,7 +83,7 @@ func (b *BlockRes) MarshalJSON() ([]byte, error) {
Nonce *hexdata `json:"nonce"` Nonce *hexdata `json:"nonce"`
Sha3Uncles *hexdata `json:"sha3Uncles"` Sha3Uncles *hexdata `json:"sha3Uncles"`
LogsBloom *hexdata `json:"logsBloom"` LogsBloom *hexdata `json:"logsBloom"`
TransactionRoot *hexdata `json:"transactionRoot"` TransactionRoot *hexdata `json:"transactionsRoot"`
StateRoot *hexdata `json:"stateRoot"` StateRoot *hexdata `json:"stateRoot"`
Miner *hexdata `json:"miner"` Miner *hexdata `json:"miner"`
Difficulty *hexnum `json:"difficulty"` Difficulty *hexnum `json:"difficulty"`

@ -34,20 +34,20 @@ func TestNewBlockRes(t *testing.T) {
extra := "" extra := ""
block := types.NewBlock(parentHash, coinbase, root, difficulty, nonce, extra) block := types.NewBlock(parentHash, coinbase, root, difficulty, nonce, extra)
tests := map[string]string{ tests := map[string]string{
"number": reNum, "number": reNum,
"hash": reHash, "hash": reHash,
"parentHash": reHash, "parentHash": reHash,
"nonce": reData, "nonce": reData,
"sha3Uncles": reHash, "sha3Uncles": reHash,
"logsBloom": reData, "logsBloom": reData,
"transactionRoot": reHash, "transactionsRoot": reHash,
"stateRoot": reHash, "stateRoot": reHash,
"miner": reAddress, "miner": reAddress,
"difficulty": `"0x1"`, "difficulty": `"0x1"`,
"totalDifficulty": reNum, "totalDifficulty": reNum,
"size": reNumNonZero, "size": reNumNonZero,
"extraData": reData, "extraData": reData,
"gasLimit": reNum, "gasLimit": reNum,
// "minGasPrice": "0x", // "minGasPrice": "0x",
"gasUsed": reNum, "gasUsed": reNum,
"timestamp": reNum, "timestamp": reNum,
@ -84,20 +84,20 @@ func TestNewBlockResWithTrans(t *testing.T) {
extra := "" extra := ""
block := types.NewBlock(parentHash, coinbase, root, difficulty, nonce, extra) block := types.NewBlock(parentHash, coinbase, root, difficulty, nonce, extra)
tests := map[string]string{ tests := map[string]string{
"number": reNum, "number": reNum,
"hash": reHash, "hash": reHash,
"parentHash": reHash, "parentHash": reHash,
"nonce": reData, "nonce": reData,
"sha3Uncles": reHash, "sha3Uncles": reHash,
"logsBloom": reData, "logsBloom": reData,
"transactionRoot": reHash, "transactionsRoot": reHash,
"stateRoot": reHash, "stateRoot": reHash,
"miner": reAddress, "miner": reAddress,
"difficulty": `"0x1"`, "difficulty": `"0x1"`,
"totalDifficulty": reNum, "totalDifficulty": reNum,
"size": reNumNonZero, "size": reNumNonZero,
"extraData": reData, "extraData": reData,
"gasLimit": reNum, "gasLimit": reNum,
// "minGasPrice": "0x", // "minGasPrice": "0x",
"gasUsed": reNum, "gasUsed": reNum,
"timestamp": reNum, "timestamp": reNum,

Loading…
Cancel
Save