Browse Source

coding standards

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
d7e4416b14
  1. 10
      libethrpc/CorsHttpServer.cpp
  2. 2
      libethrpc/CorsHttpServer.h
  3. 290
      libethrpc/WebThreeStubServer.cpp
  4. 50
      libethrpc/WebThreeStubServer.h

10
libethrpc/CorsHttpServer.cpp

@ -24,17 +24,19 @@
namespace jsonrpc namespace jsonrpc
{ {
bool CorsHttpServer::SendResponse(const std::string &response, void *addInfo) bool CorsHttpServer::SendResponse(std::string const& _response, void* _addInfo)
{ {
struct mg_connection* conn = (struct mg_connection*) addInfo; struct mg_connection* conn = (struct mg_connection*) _addInfo;
if (mg_printf(conn, "HTTP/1.1 200 OK\r\n" if (mg_printf(conn, "HTTP/1.1 200 OK\r\n"
"Content-Type: application/json\r\n" "Content-Type: application/json\r\n"
"Content-Length: %d\r\n" "Content-Length: %d\r\n"
"Access-Control-Allow-Origin: *\r\n" "Access-Control-Allow-Origin: *\r\n"
"Access-Control-Allow-Headers: Content-Type\r\n" "Access-Control-Allow-Headers: Content-Type\r\n"
"\r\n" "\r\n"
"%s",(int)response.length(), response.c_str()) > 0) "%s",(int)_response.length(), _response.c_str()) > 0)
return true; return true;
return false; return false;
}
}
} }

2
libethrpc/CorsHttpServer.h

@ -28,7 +28,7 @@ class CorsHttpServer : public HttpServer
{ {
public: public:
using HttpServer::HttpServer; using HttpServer::HttpServer;
bool virtual SendResponse(const std::string& response, void* addInfo = NULL); bool virtual SendResponse(std::string const& _response, void* _addInfo = NULL);
}; };
} }

290
libethrpc/WebThreeStubServer.cpp

@ -33,66 +33,66 @@ using namespace std;
using namespace dev; using namespace dev;
using namespace dev::eth; using namespace dev::eth;
static Json::Value toJson(dev::eth::BlockInfo const& bi) static Json::Value toJson(dev::eth::BlockInfo const& _bi)
{ {
Json::Value res; Json::Value res;
res["hash"] = boost::lexical_cast<string>(bi.hash); res["hash"] = boost::lexical_cast<string>(_bi.hash);
res["parentHash"] = toJS(bi.parentHash); res["parentHash"] = toJS(_bi.parentHash);
res["sha3Uncles"] = toJS(bi.sha3Uncles); res["sha3Uncles"] = toJS(_bi.sha3Uncles);
res["miner"] = toJS(bi.coinbaseAddress); res["miner"] = toJS(_bi.coinbaseAddress);
res["stateRoot"] = toJS(bi.stateRoot); res["stateRoot"] = toJS(_bi.stateRoot);
res["transactionsRoot"] = toJS(bi.transactionsRoot); res["transactionsRoot"] = toJS(_bi.transactionsRoot);
res["difficulty"] = toJS(bi.difficulty); res["difficulty"] = toJS(_bi.difficulty);
res["number"] = (int)bi.number; res["number"] = (int)_bi.number;
res["minGasPrice"] = toJS(bi.minGasPrice); res["minGasPrice"] = toJS(_bi.minGasPrice);
res["gasLimit"] = (int)bi.gasLimit; res["gasLimit"] = (int)_bi.gasLimit;
res["timestamp"] = (int)bi.timestamp; res["timestamp"] = (int)_bi.timestamp;
res["extraData"] = jsFromBinary(bi.extraData); res["extraData"] = jsFromBinary(_bi.extraData);
res["nonce"] = toJS(bi.nonce); res["nonce"] = toJS(_bi.nonce);
return res; return res;
} }
static Json::Value toJson(dev::eth::PastMessage const& t) static Json::Value toJson(dev::eth::PastMessage const& _t)
{ {
Json::Value res; Json::Value res;
res["input"] = jsFromBinary(t.input); res["input"] = jsFromBinary(_t.input);
res["output"] = jsFromBinary(t.output); res["output"] = jsFromBinary(_t.output);
res["to"] = toJS(t.to); res["to"] = toJS(_t.to);
res["from"] = toJS(t.from); res["from"] = toJS(_t.from);
res["value"] = jsToDecimal(toJS(t.value)); res["value"] = jsToDecimal(toJS(_t.value));
res["origin"] = toJS(t.origin); res["origin"] = toJS(_t.origin);
res["timestamp"] = toJS(t.timestamp); res["timestamp"] = toJS(_t.timestamp);
res["coinbase"] = toJS(t.coinbase); res["coinbase"] = toJS(_t.coinbase);
res["block"] = toJS(t.block); res["block"] = toJS(_t.block);
Json::Value path; Json::Value path;
for (int i: t.path) for (int i: _t.path)
path.append(i); path.append(i);
res["path"] = path; res["path"] = path;
res["number"] = (int)t.number; res["number"] = (int)_t.number;
return res; return res;
} }
static Json::Value toJson(dev::eth::PastMessages const& pms) static Json::Value toJson(dev::eth::PastMessages const& _pms)
{ {
Json::Value res; Json::Value res;
for (dev::eth::PastMessage const& t: pms) for (dev::eth::PastMessage const& t: _pms)
res.append(toJson(t)); res.append(toJson(t));
return res; return res;
} }
static Json::Value toJson(dev::eth::Transaction const& t) static Json::Value toJson(dev::eth::Transaction const& _t)
{ {
Json::Value res; Json::Value res;
res["hash"] = toJS(t.sha3()); res["hash"] = toJS(_t.sha3());
res["input"] = jsFromBinary(t.data); res["input"] = jsFromBinary(_t.data);
res["to"] = toJS(t.receiveAddress); res["to"] = toJS(_t.receiveAddress);
res["from"] = toJS(t.sender()); res["from"] = toJS(_t.sender());
res["gas"] = (int)t.gas; res["gas"] = (int)_t.gas;
res["gasPrice"] = toJS(t.gasPrice); res["gasPrice"] = toJS(_t.gasPrice);
res["nonce"] = toJS(t.nonce); res["nonce"] = toJS(_t.nonce);
res["value"] = toJS(t.value); res["value"] = toJS(_t.value);
return res; return res;
} }
@ -107,74 +107,74 @@ dev::eth::Interface* WebThreeStubServer::client() const
return m_web3.ethereum(); return m_web3.ethereum();
} }
std::string WebThreeStubServer::balanceAt(string const& address, int const& block) std::string WebThreeStubServer::balanceAt(string const& _address, int const& _block)
{ {
return toJS(client()->balanceAt(jsToAddress(address), block)); return toJS(client()->balanceAt(jsToAddress(_address), _block));
} }
dev::FixedHash<32> WebThreeStubServer::numberOrHash(Json::Value const& json) const dev::FixedHash<32> WebThreeStubServer::numberOrHash(Json::Value const& _json) const
{ {
dev::FixedHash<32> hash; dev::FixedHash<32> hash;
if (!json["hash"].empty()) if (!_json["hash"].empty())
hash = jsToFixed<32>(json["hash"].asString()); hash = jsToFixed<32>(_json["hash"].asString());
else if (!json["number"].empty()) else if (!_json["number"].empty())
hash = client()->hashFromNumber((unsigned)json["number"].asInt()); hash = client()->hashFromNumber((unsigned)_json["number"].asInt());
return hash; return hash;
} }
Json::Value WebThreeStubServer::block(Json::Value const& params) Json::Value WebThreeStubServer::block(Json::Value const& _params)
{ {
if (!client()) if (!client())
return ""; return "";
auto hash = numberOrHash(params); auto hash = numberOrHash(_params);
return toJson(client()->blockInfo(hash)); return toJson(client()->blockInfo(hash));
} }
static TransactionJS toTransaction(Json::Value const& json) static TransactionJS toTransaction(Json::Value const& _json)
{ {
TransactionJS ret; TransactionJS ret;
if (!json.isObject() || json.empty()){ if (!_json.isObject() || _json.empty()){
return ret; return ret;
} }
if (!json["from"].empty()) if (!_json["from"].empty())
ret.from = jsToSecret(json["from"].asString()); ret.from = jsToSecret(_json["from"].asString());
if (!json["to"].empty()) if (!_json["to"].empty())
ret.to = jsToAddress(json["to"].asString()); ret.to = jsToAddress(_json["to"].asString());
if (!json["value"].empty()) if (!_json["value"].empty())
ret.value = jsToU256(json["value"].asString()); ret.value = jsToU256(_json["value"].asString());
if (!json["gas"].empty()) if (!_json["gas"].empty())
ret.gas = jsToU256(json["gas"].asString()); ret.gas = jsToU256(_json["gas"].asString());
if (!json["gasPrice"].empty()) if (!_json["gasPrice"].empty())
ret.gasPrice = jsToU256(json["gasPrice"].asString()); ret.gasPrice = jsToU256(_json["gasPrice"].asString());
if (!json["data"].empty() || json["code"].empty() || json["dataclose"].empty()) if (!_json["data"].empty() || _json["code"].empty() || _json["dataclose"].empty())
{ {
if (json["data"].isString()) if (_json["data"].isString())
ret.data = jsToBytes(json["data"].asString()); ret.data = jsToBytes(_json["data"].asString());
else if (json["code"].isString()) else if (_json["code"].isString())
ret.data = jsToBytes(json["code"].asString()); ret.data = jsToBytes(_json["code"].asString());
else if (json["data"].isArray()) else if (_json["data"].isArray())
for (auto i: json["data"]) for (auto i: _json["data"])
dev::operator +=(ret.data, asBytes(jsPadded(i.asString(), 32))); dev::operator +=(ret.data, asBytes(jsPadded(i.asString(), 32)));
else if (json["code"].isArray()) else if (_json["code"].isArray())
for (auto i: json["code"]) for (auto i: _json["code"])
dev::operator +=(ret.data, asBytes(jsPadded(i.asString(), 32))); dev::operator +=(ret.data, asBytes(jsPadded(i.asString(), 32)));
else if (json["dataclose"].isArray()) else if (_json["dataclose"].isArray())
for (auto i: json["dataclose"]) for (auto i: _json["dataclose"])
dev::operator +=(ret.data, jsToBytes(i.asString())); dev::operator +=(ret.data, jsToBytes(i.asString()));
} }
return ret; return ret;
} }
std::string WebThreeStubServer::call(Json::Value const& json) std::string WebThreeStubServer::call(Json::Value const& _json)
{ {
std::string ret; std::string ret;
if (!client()) if (!client())
return ret; return ret;
TransactionJS t = toTransaction(json); TransactionJS t = toTransaction(_json);
if (!t.to) if (!t.to)
return ret; return ret;
if (!t.from && m_keys.size()) if (!t.from && m_keys.size())
@ -187,9 +187,9 @@ std::string WebThreeStubServer::call(Json::Value const& json)
return ret; return ret;
} }
std::string WebThreeStubServer::codeAt(string const& address, int const& block) std::string WebThreeStubServer::codeAt(string const& _address, int const& _block)
{ {
return client() ? jsFromBinary(client()->codeAt(jsToAddress(address), block)) : ""; return client() ? jsFromBinary(client()->codeAt(jsToAddress(_address), _block)) : "";
} }
std::string WebThreeStubServer::coinbase() std::string WebThreeStubServer::coinbase()
@ -197,9 +197,9 @@ std::string WebThreeStubServer::coinbase()
return client() ? toJS(client()->address()) : ""; return client() ? toJS(client()->address()) : "";
} }
double WebThreeStubServer::countAt(string const& address, int const& block) double WebThreeStubServer::countAt(string const& _address, int const& _block)
{ {
return client() ? (double)(uint64_t)client()->countAt(jsToAddress(address), block) : 0; return client() ? (double)(uint64_t)client()->countAt(jsToAddress(_address), _block) : 0;
} }
int WebThreeStubServer::defaultBlock() int WebThreeStubServer::defaultBlock()
@ -207,14 +207,14 @@ int WebThreeStubServer::defaultBlock()
return client() ? client()->getDefault() : 0; return client() ? client()->getDefault() : 0;
} }
std::string WebThreeStubServer::fromAscii(int const& padding, std::string const& s) std::string WebThreeStubServer::fromAscii(int const& _padding, std::string const& _s)
{ {
return jsFromBinary(s, padding); return jsFromBinary(_s, _padding);
} }
double WebThreeStubServer::fromFixed(string const& s) double WebThreeStubServer::fromFixed(string const& _s)
{ {
return jsFromFixed(s); return jsFromFixed(_s);
} }
std::string WebThreeStubServer::gasPrice() std::string WebThreeStubServer::gasPrice()
@ -247,65 +247,65 @@ Json::Value WebThreeStubServer::keys()
return ret; return ret;
} }
std::string WebThreeStubServer::lll(string const& s) std::string WebThreeStubServer::lll(string const& _s)
{ {
return toJS(dev::eth::compileLLL(s)); return toJS(dev::eth::compileLLL(_s));
} }
static dev::eth::MessageFilter toMessageFilter(Json::Value const& json) static dev::eth::MessageFilter toMessageFilter(Json::Value const& _json)
{ {
dev::eth::MessageFilter filter; dev::eth::MessageFilter filter;
if (!json.isObject() || json.empty()){ if (!_json.isObject() || _json.empty()){
return filter; return filter;
} }
if (!json["earliest"].empty()) if (!_json["earliest"].empty())
filter.withEarliest(json["earliest"].asInt()); filter.withEarliest(_json["earliest"].asInt());
if (!json["latest"].empty()) if (!_json["latest"].empty())
filter.withLatest(json["lastest"].asInt()); filter.withLatest(_json["lastest"].asInt());
if (!json["max"].empty()) if (!_json["max"].empty())
filter.withMax(json["max"].asInt()); filter.withMax(_json["max"].asInt());
if (!json["skip"].empty()) if (!_json["skip"].empty())
filter.withSkip(json["skip"].asInt()); filter.withSkip(_json["skip"].asInt());
if (!json["from"].empty()) if (!_json["from"].empty())
{ {
if (json["from"].isArray()) if (_json["from"].isArray())
for (auto i : json["from"]) for (auto i : _json["from"])
filter.from(jsToAddress(i.asString())); filter.from(jsToAddress(i.asString()));
else else
filter.from(jsToAddress(json["from"].asString())); filter.from(jsToAddress(_json["from"].asString()));
} }
if (!json["to"].empty()) if (!_json["to"].empty())
{ {
if (json["to"].isArray()) if (_json["to"].isArray())
for (auto i : json["to"]) for (auto i : _json["to"])
filter.from(jsToAddress(i.asString())); filter.from(jsToAddress(i.asString()));
else else
filter.from(jsToAddress(json["to"].asString())); filter.from(jsToAddress(_json["to"].asString()));
} }
if (!json["altered"].empty()) if (!_json["altered"].empty())
{ {
if (json["altered"].isArray()) if (_json["altered"].isArray())
for (auto i: json["altered"]) for (auto i: _json["altered"])
if (i.isObject()) if (i.isObject())
filter.altered(jsToAddress(i["id"].asString()), jsToU256(i["at"].asString())); filter.altered(jsToAddress(i["id"].asString()), jsToU256(i["at"].asString()));
else else
filter.altered((jsToAddress(i.asString()))); filter.altered((jsToAddress(i.asString())));
else if (json["altered"].isObject()) else if (_json["altered"].isObject())
filter.altered(jsToAddress(json["altered"]["id"].asString()), jsToU256(json["altered"]["at"].asString())); filter.altered(jsToAddress(_json["altered"]["id"].asString()), jsToU256(_json["altered"]["at"].asString()));
else else
filter.altered(jsToAddress(json["altered"].asString())); filter.altered(jsToAddress(_json["altered"].asString()));
} }
return filter; return filter;
} }
Json::Value WebThreeStubServer::messages(Json::Value const& json) Json::Value WebThreeStubServer::messages(Json::Value const& _json)
{ {
Json::Value res; Json::Value res;
if (!client()) if (!client())
return res; return res;
return toJson(client()->messages(toMessageFilter(json))); return toJson(client()->messages(toMessageFilter(_json)));
} }
int WebThreeStubServer::number() int WebThreeStubServer::number()
@ -313,9 +313,9 @@ int WebThreeStubServer::number()
return client() ? client()->number() + 1 : 0; return client() ? client()->number() + 1 : 0;
} }
std::string WebThreeStubServer::offset(int const & o, std::string const& s) std::string WebThreeStubServer::offset(int const& _o, std::string const& _s)
{ {
return toJS(jsToU256(s) + o); return toJS(jsToU256(_s) + _o);
} }
int WebThreeStubServer::peerCount() int WebThreeStubServer::peerCount()
@ -323,69 +323,69 @@ int WebThreeStubServer::peerCount()
return m_web3.peerCount(); return m_web3.peerCount();
} }
std::string WebThreeStubServer::secretToAddress(string const& s) std::string WebThreeStubServer::secretToAddress(string const& _s)
{ {
return toJS(KeyPair(jsToSecret(s)).address()); return toJS(KeyPair(jsToSecret(_s)).address());
} }
bool WebThreeStubServer::setCoinbase(std::string const& address) bool WebThreeStubServer::setCoinbase(std::string const& _address)
{ {
client()->setAddress(jsToAddress(address)); client()->setAddress(jsToAddress(_address));
return true; return true;
} }
bool WebThreeStubServer::setListening(bool const& listening) bool WebThreeStubServer::setListening(bool const& _listening)
{ {
if (listening) if (_listening)
m_web3.startNetwork(); m_web3.startNetwork();
else else
m_web3.stopNetwork(); m_web3.stopNetwork();
return true; return true;
} }
bool WebThreeStubServer::setMining(bool const& mining) bool WebThreeStubServer::setMining(bool const& _mining)
{ {
if (!client()) if (!client())
return Json::nullValue; return Json::nullValue;
if (mining) if (_mining)
client()->startMining(); client()->startMining();
else else
client()->stopMining(); client()->stopMining();
return true; return true;
} }
std::string WebThreeStubServer::sha3(string const& s) std::string WebThreeStubServer::sha3(string const& _s)
{ {
return toJS(dev::sha3(jsToBytes(s))); return toJS(dev::sha3(jsToBytes(_s)));
} }
std::string WebThreeStubServer::stateAt(string const& address, int const& block, string const& storage) std::string WebThreeStubServer::stateAt(string const& _address, int const& _block, string const& _storage)
{ {
return client() ? toJS(client()->stateAt(jsToAddress(address), jsToU256(storage), block)) : ""; return client() ? toJS(client()->stateAt(jsToAddress(_address), jsToU256(_storage), _block)) : "";
} }
std::string WebThreeStubServer::toAscii(string const& s) std::string WebThreeStubServer::toAscii(string const& _s)
{ {
return jsToBinary(s); return jsToBinary(_s);
} }
std::string WebThreeStubServer::toDecimal(string const& s) std::string WebThreeStubServer::toDecimal(string const& _s)
{ {
return jsToDecimal(s); return jsToDecimal(_s);
} }
std::string WebThreeStubServer::toFixed(double const& s) std::string WebThreeStubServer::toFixed(double const& _s)
{ {
return jsToFixed(s); return jsToFixed(_s);
} }
std::string WebThreeStubServer::transact(Json::Value const& json) std::string WebThreeStubServer::transact(Json::Value const& _json)
{ {
std::string ret; std::string ret;
if (!client()) if (!client())
return ret; return ret;
TransactionJS t = toTransaction(json); TransactionJS t = toTransaction(_json);
if (!t.from && m_keys.size()) if (!t.from && m_keys.size())
{ {
auto b = m_keys.front(); auto b = m_keys.front();
@ -406,56 +406,56 @@ std::string WebThreeStubServer::transact(Json::Value const& json)
return ret; return ret;
} }
Json::Value WebThreeStubServer::transaction(int const& i, Json::Value const& params) Json::Value WebThreeStubServer::transaction(int const& _i, Json::Value const& _params)
{ {
if (!client()) if (!client())
return ""; return "";
auto hash = numberOrHash(params); auto hash = numberOrHash(_params);
return toJson(client()->transaction(hash, i)); return toJson(client()->transaction(hash, _i));
} }
Json::Value WebThreeStubServer::uncle(int const& i, Json::Value const& params) Json::Value WebThreeStubServer::uncle(int const& _i, Json::Value const& _params)
{ {
if (!client()) if (!client())
return ""; return "";
auto hash = numberOrHash(params); auto hash = numberOrHash(_params);
return toJson(client()->uncle(hash, i)); return toJson(client()->uncle(hash, _i));
} }
int WebThreeStubServer::watch(string const& json) int WebThreeStubServer::watch(string const& _json)
{ {
unsigned ret = -1; unsigned ret = -1;
if (!client()) if (!client())
return ret; return ret;
if (json.compare("chain") == 0) if (_json.compare("chain") == 0)
ret = client()->installWatch(dev::eth::ChainChangedFilter); ret = client()->installWatch(dev::eth::ChainChangedFilter);
else if (json.compare("pending") == 0) else if (_json.compare("pending") == 0)
ret = client()->installWatch(dev::eth::PendingChangedFilter); ret = client()->installWatch(dev::eth::PendingChangedFilter);
else else
{ {
Json::Reader reader; Json::Reader reader;
Json::Value object; Json::Value object;
reader.parse(json, object); reader.parse(_json, object);
ret = client()->installWatch(toMessageFilter(object)); ret = client()->installWatch(toMessageFilter(object));
} }
return ret; return ret;
} }
bool WebThreeStubServer::check(int const& id) bool WebThreeStubServer::check(int const& _id)
{ {
if (!client()) if (!client())
return false; return false;
return client()->checkWatch(id); return client()->checkWatch(_id);
} }
bool WebThreeStubServer::killWatch(int const& id) bool WebThreeStubServer::killWatch(int const& _id)
{ {
if (!client()) if (!client())
return false; return false;
client()->uninstallWatch(id); client()->uninstallWatch(_id);
return true; return true;
} }

50
libethrpc/WebThreeStubServer.h

@ -38,40 +38,40 @@ class WebThreeStubServer: public AbstractWebThreeStubServer
public: public:
WebThreeStubServer(jsonrpc::AbstractServerConnector* _conn, dev::WebThreeDirect& _web3); WebThreeStubServer(jsonrpc::AbstractServerConnector* _conn, dev::WebThreeDirect& _web3);
virtual std::string balanceAt(std::string const& address, int const& block); virtual std::string balanceAt(std::string const& _address, int const& _block);
virtual Json::Value block(Json::Value const& params); virtual Json::Value block(Json::Value const& _params);
virtual std::string call(Json::Value const& json); virtual std::string call(Json::Value const& _json);
virtual std::string codeAt(std::string const& address, int const& block); virtual std::string codeAt(std::string const& _address, int const& _block);
virtual std::string coinbase(); virtual std::string coinbase();
virtual double countAt(std::string const& address, int const& block); virtual double countAt(std::string const& _address, int const& _block);
virtual int defaultBlock(); virtual int defaultBlock();
virtual std::string fromAscii(int const& padding, std::string const& s); virtual std::string fromAscii(int const& _padding, std::string const& _s);
virtual double fromFixed(std::string const& s); virtual double fromFixed(std::string const& _s);
virtual std::string gasPrice(); virtual std::string gasPrice();
virtual bool listening(); virtual bool listening();
virtual bool mining(); virtual bool mining();
virtual std::string key(); virtual std::string key();
virtual Json::Value keys(); virtual Json::Value keys();
virtual std::string lll(std::string const& s); virtual std::string lll(std::string const& _s);
virtual Json::Value messages(Json::Value const& json); virtual Json::Value messages(Json::Value const& _json);
virtual int number(); virtual int number();
virtual std::string offset(int const& o, std::string const& s); virtual std::string offset(int const& _o, std::string const& _s);
virtual int peerCount(); virtual int peerCount();
virtual std::string secretToAddress(std::string const& s); virtual std::string secretToAddress(std::string const& _s);
virtual bool setCoinbase(std::string const& address); virtual bool setCoinbase(std::string const& _address);
virtual bool setListening(bool const& listening); virtual bool setListening(bool const& _listening);
virtual bool setMining(bool const& mining); virtual bool setMining(bool const& _mining);
virtual std::string sha3(std::string const& s); virtual std::string sha3(std::string const& _s);
virtual std::string stateAt(std::string const& address, int const& block, std::string const& storage); virtual std::string stateAt(std::string const& _address, int const& _block, std::string const& _storage);
virtual std::string toAscii(std::string const& s); virtual std::string toAscii(std::string const& _s);
virtual std::string toDecimal(std::string const& s); virtual std::string toDecimal(std::string const& _s);
virtual std::string toFixed(double const& s); virtual std::string toFixed(double const& _s);
virtual std::string transact(Json::Value const & json); virtual std::string transact(Json::Value const& _json);
virtual Json::Value transaction(int const& i, Json::Value const& params); virtual Json::Value transaction(int const& _i, Json::Value const& _params);
virtual Json::Value uncle(int const& i, Json::Value const& params); virtual Json::Value uncle(int const& _i, Json::Value const& _params);
virtual int watch(std::string const& json); virtual int watch(std::string const& _json);
virtual bool check(int const& id); virtual bool check(int const& _id);
virtual bool killWatch(int const& id); virtual bool killWatch(int const& _id);
void setKeys(std::vector<dev::KeyPair> _keys) { m_keys = _keys; } void setKeys(std::vector<dev::KeyPair> _keys) { m_keys = _keys; }
private: private:

Loading…
Cancel
Save