@@ -113,15 +113,15 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
113113 return err
114114 }
115115
116- block := NewBlockRes (api .xeth ().EthBlockByHash (args .BlockHash ))
116+ block := NewBlockRes (api .xeth ().EthBlockByHash (args .BlockHash ), false )
117117 * reply = common .ToHex (big .NewInt (int64 (len (block .Transactions ))).Bytes ())
118118 case "eth_getBlockTransactionCountByNumber" :
119119 args := new (GetBlockByNumberArgs )
120120 if err := json .Unmarshal (req .Params , & args ); err != nil {
121121 return err
122122 }
123123
124- block := NewBlockRes (api .xeth ().EthBlockByNumber (args .BlockNumber ))
124+ block := NewBlockRes (api .xeth ().EthBlockByNumber (args .BlockNumber ), false )
125125 * reply = common .ToHex (big .NewInt (int64 (len (block .Transactions ))).Bytes ())
126126 case "eth_getUncleCountByBlockHash" :
127127 args := new (GetBlockByHashArgs )
@@ -130,7 +130,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
130130 }
131131
132132 block := api .xeth ().EthBlockByHash (args .BlockHash )
133- br := NewBlockRes (block )
133+ br := NewBlockRes (block , false )
134134 * reply = common .ToHex (big .NewInt (int64 (len (br .Uncles ))).Bytes ())
135135 case "eth_getUncleCountByBlockNumber" :
136136 args := new (GetBlockByNumberArgs )
@@ -139,7 +139,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
139139 }
140140
141141 block := api .xeth ().EthBlockByNumber (args .BlockNumber )
142- br := NewBlockRes (block )
142+ br := NewBlockRes (block , false )
143143 * reply = common .ToHex (big .NewInt (int64 (len (br .Uncles ))).Bytes ())
144144 case "eth_getData" , "eth_getCode" :
145145 args := new (GetDataArgs )
@@ -179,8 +179,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
179179 }
180180
181181 block := api .xeth ().EthBlockByHash (args .BlockHash )
182- br := NewBlockRes (block )
183- br .fullTx = args .IncludeTxs
182+ br := NewBlockRes (block , true )
184183
185184 * reply = br
186185 case "eth_getBlockByNumber" :
@@ -190,8 +189,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
190189 }
191190
192191 block := api .xeth ().EthBlockByNumber (args .BlockNumber )
193- br := NewBlockRes (block )
194- br .fullTx = args .IncludeTxs
192+ br := NewBlockRes (block , true )
195193
196194 * reply = br
197195 case "eth_getTransactionByHash" :
@@ -214,8 +212,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
214212 }
215213
216214 block := api .xeth ().EthBlockByHash (args .Hash )
217- br := NewBlockRes (block )
218- br .fullTx = true
215+ br := NewBlockRes (block , true )
219216
220217 if args .Index >= int64 (len (br .Transactions )) || args .Index < 0 {
221218 return NewValidationError ("Index" , "does not exist" )
@@ -228,8 +225,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
228225 }
229226
230227 block := api .xeth ().EthBlockByNumber (args .BlockNumber )
231- v := NewBlockRes (block )
232- v .fullTx = true
228+ v := NewBlockRes (block , true )
233229
234230 if args .Index >= int64 (len (v .Transactions )) || args .Index < 0 {
235231 return NewValidationError ("Index" , "does not exist" )
@@ -241,14 +237,14 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
241237 return err
242238 }
243239
244- br := NewBlockRes (api .xeth ().EthBlockByHash (args .Hash ))
240+ br := NewBlockRes (api .xeth ().EthBlockByHash (args .Hash ), false )
245241
246242 if args .Index >= int64 (len (br .Uncles )) || args .Index < 0 {
247243 return NewValidationError ("Index" , "does not exist" )
248244 }
249245
250246 uhash := br .Uncles [args .Index ]
251- uncle := NewBlockRes (api .xeth ().EthBlockByHash (uhash .String ()))
247+ uncle := NewBlockRes (api .xeth ().EthBlockByHash (uhash .String ()), false )
252248
253249 * reply = uncle
254250 case "eth_getUncleByBlockNumberAndIndex" :
@@ -258,15 +254,14 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
258254 }
259255
260256 block := api .xeth ().EthBlockByNumber (args .BlockNumber )
261- v := NewBlockRes (block )
262- v .fullTx = true
257+ v := NewBlockRes (block , true )
263258
264259 if args .Index >= int64 (len (v .Uncles )) || args .Index < 0 {
265260 return NewValidationError ("Index" , "does not exist" )
266261 }
267262
268263 uhash := v .Uncles [args .Index ]
269- uncle := NewBlockRes (api .xeth ().EthBlockByHash (uhash .String ()))
264+ uncle := NewBlockRes (api .xeth ().EthBlockByHash (uhash .String ()), false )
270265
271266 * reply = uncle
272267 case "eth_getCompilers" :
0 commit comments