Browse Source

common changes

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
28d69e0981
  1. 2
      alethzero/OurWebThreeStubServer.cpp
  2. 2
      alethzero/OurWebThreeStubServer.h
  3. 8
      test/jsonrpc.cpp

2
alethzero/OurWebThreeStubServer.cpp

@ -24,7 +24,7 @@ using namespace std;
using namespace dev;
using namespace dev::eth;
OurWebThreeStubServer::OurWebThreeStubServer(jsonrpc::AbstractServerConnector* _conn, dev::WebThreeDirect& _web3, std::vector<dev::KeyPair> const& _accounts):
OurWebThreeStubServer::OurWebThreeStubServer(jsonrpc::AbstractServerConnector& _conn, dev::WebThreeDirect& _web3, std::vector<dev::KeyPair> const& _accounts):
WebThreeStubServer(_conn, _web3, _accounts)
{}

2
alethzero/OurWebThreeStubServer.h

@ -29,7 +29,7 @@ class OurWebThreeStubServer: public QObject, public WebThreeStubServer
Q_OBJECT
public:
OurWebThreeStubServer(jsonrpc::AbstractServerConnector* _conn, dev::WebThreeDirect& _web3, std::vector<dev::KeyPair> const& _accounts);
OurWebThreeStubServer(jsonrpc::AbstractServerConnector& _conn, dev::WebThreeDirect& _web3, std::vector<dev::KeyPair> const& _accounts);
virtual std::string shh_newIdentity() override;

8
test/jsonrpc.cpp

@ -29,8 +29,8 @@
#include <libwebthree/WebThree.h>
#include <libweb3jsonrpc/WebThreeStubServer.h>
#include <libweb3jsonrpc/CorsHttpServer.h>
#include <jsonrpc/connectors/httpserver.h>
#include <jsonrpc/connectors/httpclient.h>
#include <jsonrpccpp/server/connectors/httpserver.h>
#include <jsonrpccpp/client/connectors/httpclient.h>
#include <set>
#include "JsonSpiritHeaders.h"
#include "TestHelper.h"
@ -61,11 +61,11 @@ struct Setup
web3->setIdealPeerCount(5);
web3->ethereum()->setForceMining(true);
jsonrpcServer = unique_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(8080), *web3, {}));
jsonrpcServer = unique_ptr<WebThreeStubServer>(new WebThreeStubServer(jsonrpc::CorsHttpServer(8080), *web3, {}));
jsonrpcServer->setIdentities({});
jsonrpcServer->StartListening();
jsonrpcClient = unique_ptr<WebThreeStubClient>(new WebThreeStubClient(new jsonrpc::HttpClient("http://localhost:8080")));
jsonrpcClient = unique_ptr<WebThreeStubClient>(new WebThreeStubClient(jsonrpc::HttpClient("http://localhost:8080")));
}
};

Loading…
Cancel
Save