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

Method eth_getBlockTransactionCountByHash

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

Source from the content-addressed store, hash-verified

172}
173
174Json::Value Eth::eth_getBlockTransactionCountByHash(string const& _blockHash)
175{
176 try
177 {
178 h256 blockHash = jsToFixed<32>(_blockHash);
179 if (!client()->isKnown(blockHash))
180 return Json::Value(Json::nullValue);
181
182 return toJS(client()->transactionCount(blockHash));
183 }
184 catch (...)
185 {
186 BOOST_THROW_EXCEPTION(JsonRpcException(Errors::ERROR_RPC_INVALID_PARAMS));
187 }
188}
189
190Json::Value Eth::eth_getBlockTransactionCountByNumber(string const& _blockNumber)
191{

Calls 4

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

Tested by

no test coverage detected