Browse Source

key, keys -> accounts populated to WebThreeStubServer

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
b64945735b
  1. 6
      eth/main.cpp
  2. 2
      libdevcore/CommonJS.h
  3. 69
      libethrpc/WebThreeStubServer.cpp
  4. 9
      libethrpc/WebThreeStubServer.h
  5. 21
      libethrpc/abstractwebthreestubserver.h
  6. 6
      libethrpc/eth.js
  7. 67
      libethrpc/spec.json
  8. 2
      libqethereum/QEthereum.cpp
  9. 6
      neth/main.cpp
  10. 2
      test/jsonrpc.cpp
  11. 36
      test/webthreestubclient.h

6
eth/main.cpp

@ -340,8 +340,7 @@ int main(int argc, char** argv)
auto_ptr<WebThreeStubServer> jsonrpcServer;
if (jsonrpc > -1)
{
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(jsonrpc), web3));
jsonrpcServer->setKeys({us});
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(jsonrpc), web3, {us}));
jsonrpcServer->StartListening();
}
#endif
@ -428,8 +427,7 @@ int main(int argc, char** argv)
{
if (jsonrpc < 0)
jsonrpc = 8080;
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(jsonrpc), web3));
jsonrpcServer->setKeys({us});
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(jsonrpc), web3, {us}));
jsonrpcServer->StartListening();
}
else if (cmd == "jsonstop")

2
libdevcore/CommonJS.h

@ -116,7 +116,7 @@ inline double jsFromFixed(std::string const& _s)
struct TransactionJS
{
Secret from;
Address from;
Address to;
u256 value;
bytes data;

69
libethrpc/WebThreeStubServer.cpp

@ -96,10 +96,18 @@ static Json::Value toJson(dev::eth::Transaction const& _t)
return res;
}
WebThreeStubServer::WebThreeStubServer(jsonrpc::AbstractServerConnector* _conn, WebThreeDirect& _web3):
WebThreeStubServer::WebThreeStubServer(jsonrpc::AbstractServerConnector* _conn, WebThreeDirect& _web3, std::vector<dev::KeyPair> _accounts):
AbstractWebThreeStubServer(_conn),
m_web3(_web3)
{
setAccounts(_accounts);
}
void WebThreeStubServer::setAccounts(std::vector<dev::KeyPair> const& _accounts)
{
m_accounts.clear();
for (auto i: _accounts)
m_accounts[i.address()] = i.secret();
}
dev::eth::Interface* WebThreeStubServer::client() const
@ -107,6 +115,14 @@ dev::eth::Interface* WebThreeStubServer::client() const
return m_web3.ethereum();
}
Json::Value WebThreeStubServer::accounts()
{
Json::Value ret;
for (auto i: m_accounts)
ret.append(toJS(i.first));
return ret;
}
std::string WebThreeStubServer::balanceAt(string const& _address, int const& _block)
{
return toJS(client()->balanceAt(jsToAddress(_address), _block));
@ -139,7 +155,7 @@ static TransactionJS toTransaction(Json::Value const& _json)
}
if (!_json["from"].empty())
ret.from = jsToSecret(_json["from"].asString());
ret.from = jsToAddress(_json["from"].asString());
if (!_json["to"].empty())
ret.to = jsToAddress(_json["to"].asString());
if (!_json["value"].empty())
@ -175,15 +191,21 @@ std::string WebThreeStubServer::call(Json::Value const& _json)
if (!client())
return ret;
TransactionJS t = toTransaction(_json);
if (!t.to)
if (!t.from && m_accounts.size())
{
auto b = m_accounts.begin()->first;
for (auto a: m_accounts)
if (client()->balanceAt(a.first) > client()->balanceAt(b))
b = a.first;
t.from = b;
}
if (!m_accounts.count(t.from))
return ret;
if (!t.from && m_keys.size())
t.from = m_keys[0].secret();
if (!t.gasPrice)
t.gasPrice = 10 * dev::eth::szabo;
if (!t.gas)
t.gas = client()->balanceAt(KeyPair(t.from).address()) / t.gasPrice;
ret = toJS(client()->call(t.from, t.value, t.to, t.data, t.gas, t.gasPrice));
ret = toJS(client()->call(m_accounts[t.from].secret(), t.value, t.to, t.data, t.gas, t.gasPrice));
return ret;
}
@ -232,21 +254,6 @@ bool WebThreeStubServer::mining()
return client() ? client()->isMining() : false;
}
std::string WebThreeStubServer::key()
{
if (!m_keys.size())
return std::string();
return toJS(m_keys[0].sec());
}
Json::Value WebThreeStubServer::keys()
{
Json::Value ret;
for (auto i: m_keys)
ret.append(toJS(i.secret()));
return ret;
}
std::string WebThreeStubServer::lll(string const& _s)
{
return toJS(dev::eth::compileLLL(_s));
@ -386,22 +393,26 @@ std::string WebThreeStubServer::transact(Json::Value const& _json)
if (!client())
return ret;
TransactionJS t = toTransaction(_json);
if (!t.from && m_keys.size())
if (!t.from && m_accounts.size())
{
auto b = m_keys.front();
for (auto a: m_keys)
if (client()->balanceAt(KeyPair(a).address()) > client()->balanceAt(KeyPair(b).address()))
b = a;
t.from = b.secret();
auto b = m_accounts.begin()->first;
for (auto a: m_accounts)
if (client()->balanceAt(a.first) > client()->balanceAt(b))
b = a.first;
t.from = b;
}
if (!m_accounts.count(t.from))
return ret;
if (!t.gasPrice)
t.gasPrice = 10 * dev::eth::szabo;
if (!t.gas)
t.gas = min<u256>(client()->gasLimitRemaining(), client()->balanceAt(KeyPair(t.from).address()) / t.gasPrice);
cwarn << "Silently signing transaction from address" << t.from.abridged() << ": User validation hook goes here.";
if (t.to)
client()->transact(t.from, t.value, t.to, t.data, t.gas, t.gasPrice);
// TODO: from qethereum, insert validification hook here.
client()->transact(m_accounts[t.from].secret(), t.value, t.to, t.data, t.gas, t.gasPrice);
else
ret = toJS(client()->transact(t.from, t.value, t.data, t.gas, t.gasPrice));
ret = toJS(client()->transact(m_accounts[t.from].secret(), t.value, t.data, t.gas, t.gasPrice));
client()->flushTransactions();
return ret;
}

9
libethrpc/WebThreeStubServer.h

@ -36,8 +36,9 @@ namespace dev { class WebThreeDirect; namespace eth { class Interface; } class K
class WebThreeStubServer: public AbstractWebThreeStubServer
{
public:
WebThreeStubServer(jsonrpc::AbstractServerConnector* _conn, dev::WebThreeDirect& _web3);
WebThreeStubServer(jsonrpc::AbstractServerConnector* _conn, dev::WebThreeDirect& _web3, std::vector<dev::KeyPair> _accounts);
virtual Json::Value accounts();
virtual std::string balanceAt(std::string const& _address, int const& _block);
virtual Json::Value block(Json::Value const& _params);
virtual std::string call(Json::Value const& _json);
@ -50,8 +51,6 @@ public:
virtual std::string gasPrice();
virtual bool listening();
virtual bool mining();
virtual std::string key();
virtual Json::Value keys();
virtual std::string lll(std::string const& _s);
virtual Json::Value messages(Json::Value const& _json);
virtual int number();
@ -73,10 +72,10 @@ public:
virtual bool check(int const& _id);
virtual bool killWatch(int const& _id);
void setKeys(std::vector<dev::KeyPair> _keys) { m_keys = _keys; }
void setAccounts(std::vector<dev::KeyPair> const& _accounts);
private:
dev::eth::Interface* client() const;
dev::WebThreeDirect& m_web3;
std::vector<dev::KeyPair> m_keys;
std::map<dev::Address, dev::KeyPair> m_accounts;
dev::FixedHash<32> numberOrHash(Json::Value const& _json) const;
};

21
libethrpc/abstractwebthreestubserver.h

@ -13,6 +13,7 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
AbstractWebThreeStubServer(jsonrpc::AbstractServerConnector* conn) :
jsonrpc::AbstractServer<AbstractWebThreeStubServer>(conn)
{
this->bindAndAddMethod(new jsonrpc::Procedure("accounts", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_ARRAY, NULL), &AbstractWebThreeStubServer::accountsI);
this->bindAndAddMethod(new jsonrpc::Procedure("balanceAt", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, "address",jsonrpc::JSON_STRING,"block",jsonrpc::JSON_INTEGER, NULL), &AbstractWebThreeStubServer::balanceAtI);
this->bindAndAddMethod(new jsonrpc::Procedure("block", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_OBJECT, "params",jsonrpc::JSON_OBJECT, NULL), &AbstractWebThreeStubServer::blockI);
this->bindAndAddMethod(new jsonrpc::Procedure("call", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, "json",jsonrpc::JSON_OBJECT, NULL), &AbstractWebThreeStubServer::callI);
@ -24,8 +25,6 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
this->bindAndAddMethod(new jsonrpc::Procedure("fromAscii", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, "padding",jsonrpc::JSON_INTEGER,"s",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::fromAsciiI);
this->bindAndAddMethod(new jsonrpc::Procedure("fromFixed", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_REAL, "s",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::fromFixedI);
this->bindAndAddMethod(new jsonrpc::Procedure("gasPrice", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::gasPriceI);
this->bindAndAddMethod(new jsonrpc::Procedure("key", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::keyI);
this->bindAndAddMethod(new jsonrpc::Procedure("keys", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_ARRAY, NULL), &AbstractWebThreeStubServer::keysI);
this->bindAndAddMethod(new jsonrpc::Procedure("killWatch", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, "id",jsonrpc::JSON_INTEGER, NULL), &AbstractWebThreeStubServer::killWatchI);
this->bindAndAddMethod(new jsonrpc::Procedure("listening", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, NULL), &AbstractWebThreeStubServer::listeningI);
this->bindAndAddMethod(new jsonrpc::Procedure("lll", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, "s",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::lllI);
@ -50,6 +49,11 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
}
inline virtual void accountsI(const Json::Value& request, Json::Value& response)
{
response = this->accounts();
}
inline virtual void balanceAtI(const Json::Value& request, Json::Value& response)
{
response = this->balanceAt(request["address"].asString(), request["block"].asInt());
@ -105,16 +109,6 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
response = this->gasPrice();
}
inline virtual void keyI(const Json::Value& request, Json::Value& response)
{
response = this->key();
}
inline virtual void keysI(const Json::Value& request, Json::Value& response)
{
response = this->keys();
}
inline virtual void killWatchI(const Json::Value& request, Json::Value& response)
{
response = this->killWatch(request["id"].asInt());
@ -221,6 +215,7 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
}
virtual Json::Value accounts() = 0;
virtual std::string balanceAt(const std::string& address, const int& block) = 0;
virtual Json::Value block(const Json::Value& params) = 0;
virtual std::string call(const Json::Value& json) = 0;
@ -232,8 +227,6 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
virtual std::string fromAscii(const int& padding, const std::string& s) = 0;
virtual double fromFixed(const std::string& s) = 0;
virtual std::string gasPrice() = 0;
virtual std::string key() = 0;
virtual Json::Value keys() = 0;
virtual bool killWatch(const int& id) = 0;
virtual bool listening() = 0;
virtual std::string lll(const std::string& s) = 0;

6
libethrpc/eth.js

@ -25,8 +25,7 @@ if (typeof(window.eth) === "undefined")
{ "method": "mining", "params": null, "order": [], "returns" : false },
{ "method": "setMining", "params": { "mining": false }, "order" : ["mining"], "returns" : true },
{ "method": "gasPrice", "params": null, "order": [], "returns" : "" },
{ "method": "key", "params": null, "order": [], "returns" : "" },
{ "method": "keys", "params": null, "order": [], "returns" : [] },
{ "method": "accounts", "params": null, "order": [], "returns" : [] },
{ "method": "peerCount", "params": null, "order": [], "returns" : 0 },
{ "method": "defaultBlock", "params": null, "order": [], "returns" : 0},
{ "method": "number", "params": null, "order": [], "returns" : 0},
@ -139,8 +138,7 @@ if (typeof(window.eth) === "undefined")
{ name: "listening", getter: "listening", setter: "setListening" },
{ name: "mining", getter: "mining", setter: "setMining" },
{ name: "gasPrice", getter: "gasPrice"},
{ name: "key", getter: "key" },
{ name: "keys", getter: "keys" },
{ name: "accounts", getter: "accounts" },
{ name: "peerCount", getter: "peerCount" },
{ name: "defaultBlock", getter: "defaultBlock" },
{ name: "number", getter: "number" }

67
libethrpc/spec.json

@ -1,43 +1,42 @@
[
{ "method": "coinbase", "params": null, "order": [], "returns" : "" },
{ "method": "setCoinbase", "params": { "address": "" }, "order": ["address"], "returns" : true },
{ "method": "listening", "params": null, "order": [], "returns" : false },
{ "method": "setListening", "params": { "listening": false }, "order" : ["listening"], "returns" : true },
{ "method": "mining", "params": null, "order": [], "returns" : false },
{ "method": "setMining", "params": { "mining": false }, "order" : ["mining"], "returns" : true },
{ "method": "gasPrice", "params": null, "order": [], "returns" : "" },
{ "method": "key", "params": null, "order": [], "returns" : "" },
{ "method": "keys", "params": null, "order": [], "returns" : [] },
{ "method": "peerCount", "params": null, "order": [], "returns" : 0 },
{ "method": "defaultBlock", "params": null, "order": [], "returns" : 0},
{ "method": "number", "params": null, "order": [], "returns" : 0},
{ "method": "coinbase", "params": null, "order": [], "returns" : "" },
{ "method": "setCoinbase", "params": { "address": "" }, "order": ["address"], "returns" : true },
{ "method": "listening", "params": null, "order": [], "returns" : false },
{ "method": "setListening", "params": { "listening": false }, "order" : ["listening"], "returns" : true },
{ "method": "mining", "params": null, "order": [], "returns" : false },
{ "method": "setMining", "params": { "mining": false }, "order" : ["mining"], "returns" : true },
{ "method": "gasPrice", "params": null, "order": [], "returns" : "" },
{ "method": "accounts", "params": null, "order": [], "returns" : [] },
{ "method": "peerCount", "params": null, "order": [], "returns" : 0 },
{ "method": "defaultBlock", "params": null, "order": [], "returns" : 0},
{ "method": "number", "params": null, "order": [], "returns" : 0},
{ "method": "balanceAt", "params": { "address": "", "block": 0}, "order": ["address", "block"], "returns" : ""},
{ "method": "stateAt", "params": { "address": "", "storage": "", "block": 0}, "order": ["address", "storage", "block"], "returns": ""},
{ "method": "countAt", "params": { "address": "", "block": 0}, "order": ["address", "block"], "returns" : 0.0},
{ "method": "codeAt", "params": { "address": "", "block": 0}, "order": ["address", "block"], "returns": ""},
{ "method": "balanceAt", "params": { "address": "", "block": 0}, "order": ["address", "block"], "returns" : ""},
{ "method": "stateAt", "params": { "address": "", "storage": "", "block": 0}, "order": ["address", "storage", "block"], "returns": ""},
{ "method": "countAt", "params": { "address": "", "block": 0}, "order": ["address", "block"], "returns" : 0.0},
{ "method": "codeAt", "params": { "address": "", "block": 0}, "order": ["address", "block"], "returns": ""},
{ "method": "transact", "params": { "json": {}}, "order": ["json"], "returns": ""},
{ "method": "call", "params": { "json": {}}, "order": ["json"], "returns": ""},
{ "method": "transact", "params": { "json": {}}, "order": ["json"], "returns": ""},
{ "method": "call", "params": { "json": {}}, "order": ["json"], "returns": ""},
{ "method": "block", "params": { "params": {}}, "order": ["params"], "returns": {}},
{ "method": "transaction", "params": { "params": {}, "i": 0}, "order": ["params", "i"], "returns": {}},
{ "method": "uncle", "params": { "params": {}, "i": 0}, "order": ["params", "i"], "returns": {}},
{ "method": "block", "params": { "params": {}}, "order": ["params"], "returns": {}},
{ "method": "transaction", "params": { "params": {}, "i": 0}, "order": ["params", "i"], "returns": {}},
{ "method": "uncle", "params": { "params": {}, "i": 0}, "order": ["params", "i"], "returns": {}},
{ "method": "messages", "params": { "params": {}}, "order": ["params"], "returns": []},
{ "method": "watch", "params": { "params": ""}, "order": ["params"], "returns": 0},
{ "method": "check", "params": { "id": 0}, "order": [], "returns": true},
{ "method": "killWatch", "params": { "id": 0}, "order": ["params"], "returns": true},
{ "method": "messages", "params": { "params": {}}, "order": ["params"], "returns": []},
{ "method": "watch", "params": { "params": ""}, "order": ["params"], "returns": 0},
{ "method": "check", "params": { "id": 0}, "order": [], "returns": true},
{ "method": "killWatch", "params": { "id": 0}, "order": ["params"], "returns": true},
{ "method": "secretToAddress", "params": { "s": ""}, "order": ["s"], "returns": ""},
{ "method": "lll", "params": { "s": ""}, "order": ["s"], "returns": ""},
{ "method": "sha3", "params": { "s": ""}, "order": ["s"], "returns": ""},
{ "method": "toAscii", "params": { "s": ""}, "order": ["s"], "returns": ""},
{ "method": "fromAscii", "params": { "s": "", "padding": 0}, "order": ["s", "padding"], "returns": ""},
{ "method": "toDecimal", "params": {"s": ""}, "order": ["s"], "returns" : ""},
{ "method": "toFixed", "params": {"s": 0.0}, "order": ["s"], "returns" : ""},
{ "method": "fromFixed", "params": {"s": ""}, "order": ["s"], "returns" : 0.0},
{ "method": "offset", "params": {"s": "", "o": 0}, "order": ["s", "o"], "returns" : ""}
{ "method": "secretToAddress", "params": { "s": ""}, "order": ["s"], "returns": ""},
{ "method": "lll", "params": { "s": ""}, "order": ["s"], "returns": ""},
{ "method": "sha3", "params": { "s": ""}, "order": ["s"], "returns": ""},
{ "method": "toAscii", "params": { "s": ""}, "order": ["s"], "returns": ""},
{ "method": "fromAscii", "params": { "s": "", "padding": 0}, "order": ["s", "padding"], "returns": ""},
{ "method": "toDecimal", "params": {"s": ""}, "order": ["s"], "returns" : ""},
{ "method": "toFixed", "params": {"s": 0.0}, "order": ["s"], "returns" : ""},
{ "method": "fromFixed", "params": {"s": ""}, "order": ["s"], "returns" : 0.0},
{ "method": "offset", "params": {"s": "", "o": 0}, "order": ["s", "o"], "returns" : ""}
]

2
libqethereum/QEthereum.cpp

@ -462,7 +462,7 @@ QString QEthereum::doTransactImpl(QString _json)
// TODO: insert validification hook here.
client()->transact(m_accounts[t.from].secret(), t.value, t.to, t.data, t.gas, t.gasPrice);
else
ret = toQJS(client()->transact(t.from, t.value, t.data, t.gas, t.gasPrice));
ret = toQJS(client()->transact(m_accounts[t.from].secret(), t.value, t.data, t.gas, t.gasPrice));
client()->flushTransactions();
return ret;
}

6
neth/main.cpp

@ -478,8 +478,7 @@ int main(int argc, char** argv)
auto_ptr<WebThreeStubServer> jsonrpcServer;
if (jsonrpc > -1)
{
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::HttpServer(jsonrpc), web3));
jsonrpcServer->setKeys({us});
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::HttpServer(jsonrpc), web3, {us}));
jsonrpcServer->StartListening();
}
#endif
@ -552,8 +551,7 @@ int main(int argc, char** argv)
{
if (jsonrpc < 0)
jsonrpc = 8080;
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::HttpServer(jsonrpc), web3));
jsonrpcServer->setKeys({us});
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::HttpServer(jsonrpc), web3, {us}));
jsonrpcServer->StartListening();
}
else if (cmd == "jsonstop")

2
test/jsonrpc.cpp

@ -60,7 +60,7 @@ struct JsonrpcFixture {
web3.setIdealPeerCount(5);
web3.ethereum()->setForceMining(true);
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(8080), web3));
jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(8080), web3, {}));
jsonrpcServer->StartListening();
jsonrpcClient = auto_ptr<WebThreeStubClient>(new WebThreeStubClient(new jsonrpc::HttpClient("http://localhost:8080")));

36
test/webthreestubclient.h

@ -19,6 +19,18 @@ class WebThreeStubClient
delete this->client;
}
Json::Value accounts() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
Json::Value result = this->client->CallMethod("accounts",p);
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
std::string balanceAt(const std::string& address, const int& block) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
@ -163,30 +175,6 @@ p["s"] = s;
}
std::string key() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
Json::Value result = this->client->CallMethod("key",p);
if (result.isString())
return result.asString();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
Json::Value keys() throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p = Json::nullValue;
Json::Value result = this->client->CallMethod("keys",p);
if (result.isArray())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
bool killWatch(const int& id) throw (jsonrpc::JsonRpcException)
{
Json::Value p;

Loading…
Cancel
Save