MCPcopy Create free account
hub / github.com/LUX-Core/lux / eth_getBlockTransactionCountByNumber

Method eth_getBlockTransactionCountByNumber

src/cpp-ethereum/libweb3jsonrpc/Eth.cpp:190–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190Json::Value Eth::eth_getBlockTransactionCountByNumber(string const& _blockNumber)
191{
192 try
193 {
194 BlockNumber blockNumber = jsToBlockNumber(_blockNumber);
195 if (!client()->isKnown(blockNumber))
196 return Json::Value(Json::nullValue);
197
198 return toJS(client()->transactionCount(jsToBlockNumber(_blockNumber)));
199 }
200 catch (...)
201 {
202 BOOST_THROW_EXCEPTION(JsonRpcException(Errors::ERROR_RPC_INVALID_PARAMS));
203 }
204}
205
206Json::Value Eth::eth_getUncleCountByBlockHash(string const& _blockHash)
207{

Calls 5

jsToBlockNumberFunction · 0.85
toJSFunction · 0.85
ValueClass · 0.50
isKnownMethod · 0.45
transactionCountMethod · 0.45

Tested by

no test coverage detected