Browse Source

eth_queuedTransactions renamed to eth_fetchQueuedTransactions

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
4be34ff176
  1. 2
      libweb3jsonrpc/WebThreeStubServerBase.cpp
  2. 2
      libweb3jsonrpc/WebThreeStubServerBase.h
  3. 8
      libweb3jsonrpc/abstractwebthreestubserver.h
  4. 2
      libweb3jsonrpc/spec.json
  5. 4
      test/webthreestubclient.h

2
libweb3jsonrpc/WebThreeStubServerBase.cpp

@ -911,7 +911,7 @@ bool WebThreeStubServerBase::eth_unregister(string const& _accountId)
return m_accounts->removeProxyAccount(id);
}
Json::Value WebThreeStubServerBase::eth_queuedTransactions(string const& _accountId)
Json::Value WebThreeStubServerBase::eth_fetchQueuedTransactions(string const& _accountId)
{
unsigned id;

2
libweb3jsonrpc/WebThreeStubServerBase.h

@ -110,7 +110,7 @@ public:
virtual bool eth_submitWork(std::string const& _nonce, std::string const& _mixHash);
virtual std::string eth_register(std::string const& _address);
virtual bool eth_unregister(std::string const& _accountId);
virtual Json::Value eth_queuedTransactions(std::string const& _accountId);
virtual Json::Value eth_fetchQueuedTransactions(std::string const& _accountId);
virtual bool db_put(std::string const& _name, std::string const& _key, std::string const& _value);
virtual std::string db_get(std::string const& _name, std::string const& _key);

8
libweb3jsonrpc/abstractwebthreestubserver.h

@ -53,7 +53,7 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
this->bindAndAddMethod(jsonrpc::Procedure("eth_submitWork", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_submitWorkI);
this->bindAndAddMethod(jsonrpc::Procedure("eth_register", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_registerI);
this->bindAndAddMethod(jsonrpc::Procedure("eth_unregister", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_unregisterI);
this->bindAndAddMethod(jsonrpc::Procedure("eth_queuedTransactions", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_queuedTransactionsI);
this->bindAndAddMethod(jsonrpc::Procedure("eth_fetchQueuedTransactions", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_fetchQueuedTransactionsI);
this->bindAndAddMethod(jsonrpc::Procedure("db_put", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING,"param3",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::db_putI);
this->bindAndAddMethod(jsonrpc::Procedure("db_get", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::db_getI);
this->bindAndAddMethod(jsonrpc::Procedure("shh_post", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_OBJECT, NULL), &AbstractWebThreeStubServer::shh_postI);
@ -241,9 +241,9 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
{
response = this->eth_unregister(request[0u].asString());
}
inline virtual void eth_queuedTransactionsI(const Json::Value &request, Json::Value &response)
inline virtual void eth_fetchQueuedTransactionsI(const Json::Value &request, Json::Value &response)
{
response = this->eth_queuedTransactions(request[0u].asString());
response = this->eth_fetchQueuedTransactions(request[0u].asString());
}
inline virtual void db_putI(const Json::Value &request, Json::Value &response)
{
@ -331,7 +331,7 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr
virtual bool eth_submitWork(const std::string& param1, const std::string& param2) = 0;
virtual std::string eth_register(const std::string& param1) = 0;
virtual bool eth_unregister(const std::string& param1) = 0;
virtual Json::Value eth_queuedTransactions(const std::string& param1) = 0;
virtual Json::Value eth_fetchQueuedTransactions(const std::string& param1) = 0;
virtual bool db_put(const std::string& param1, const std::string& param2, const std::string& param3) = 0;
virtual std::string db_get(const std::string& param1, const std::string& param2) = 0;
virtual bool shh_post(const Json::Value& param1) = 0;

2
libweb3jsonrpc/spec.json

@ -42,7 +42,7 @@
{ "name": "eth_submitWork", "params": ["", ""], "order": [], "returns": true},
{ "name": "eth_register", "params": [""], "order": [], "returns": ""},
{ "name": "eth_unregister", "params": [""], "order": [], "returns": true},
{ "name": "eth_queuedTransactions", "params": [""], "order": [], "returns": []},
{ "name": "eth_fetchQueuedTransactions", "params": [""], "order": [], "returns": []},
{ "name": "db_put", "params": ["", "", ""], "order": [], "returns": true},
{ "name": "db_get", "params": ["", ""], "order": [], "returns": ""},

4
test/webthreestubclient.h

@ -436,11 +436,11 @@ class WebThreeStubClient : public jsonrpc::Client
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
Json::Value eth_queuedTransactions(const std::string& param1) throw (jsonrpc::JsonRpcException)
Json::Value eth_fetchQueuedTransactions(const std::string& param1) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p.append(param1);
Json::Value result = this->CallMethod("eth_queuedTransactions",p);
Json::Value result = this->CallMethod("eth_fetchQueuedTransactions",p);
if (result.isArray())
return result;
else

Loading…
Cancel
Save