aboutsummaryrefslogtreecommitdiffstats
path: root/jsonrpc.cpp
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2014-10-17 01:03:41 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2014-10-17 01:03:41 +0800
commit2c8e577f4c4066f4348975971afeeb8aeff03807 (patch)
tree3715bbbb59a8a202ea69bf24cde414dbc138feca /jsonrpc.cpp
parent9fa0453e47a973abdac9e1254d67b4c7919222cf (diff)
downloaddexon-solidity-2c8e577f4c4066f4348975971afeeb8aeff03807.tar
dexon-solidity-2c8e577f4c4066f4348975971afeeb8aeff03807.tar.gz
dexon-solidity-2c8e577f4c4066f4348975971afeeb8aeff03807.tar.bz2
dexon-solidity-2c8e577f4c4066f4348975971afeeb8aeff03807.tar.lz
dexon-solidity-2c8e577f4c4066f4348975971afeeb8aeff03807.tar.xz
dexon-solidity-2c8e577f4c4066f4348975971afeeb8aeff03807.tar.zst
dexon-solidity-2c8e577f4c4066f4348975971afeeb8aeff03807.zip
EthStubServer renamed to WebThreeStubServer
Diffstat (limited to 'jsonrpc.cpp')
-rw-r--r--jsonrpc.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/jsonrpc.cpp b/jsonrpc.cpp
index be03dbea..e163014a 100644
--- a/jsonrpc.cpp
+++ b/jsonrpc.cpp
@@ -27,29 +27,30 @@
#include <libdevcore/CommonIO.h>
#include <libdevcore/CommonJS.h>
#include <libwebthree/WebThree.h>
-#include <libethrpc/EthStubServer.h>
+#include <libethrpc/WebThreeStubServer.h>
#include <libethrpc/CorsHttpServer.h>
#include <jsonrpc/connectors/httpserver.h>
#include <jsonrpc/connectors/httpclient.h>
+#include <set>
#include "JsonSpiritHeaders.h"
#include "TestHelper.h"
-#include "ethstubclient.h"
+#include "webthreestubclient.h"
using namespace std;
using namespace dev;
using namespace dev::eth;
namespace js = json_spirit;
-
namespace jsonrpc_tests {
string name = "Ethereum(++) tests";
string dbPath;
-dev::WebThreeDirect web3(name, dbPath, true);
-
-auto_ptr<EthStubServer> jsonrpcServer;
-auto_ptr<EthStubClient> jsonrpcClient;
+auto s = set<string>{"eth", "shh"};
+dev::p2p::NetworkPreferences np(30303, std::string(), false);
+dev::WebThreeDirect web3(name, dbPath, true, s, np);
+auto_ptr<WebThreeStubServer> jsonrpcServer;
+auto_ptr<WebThreeStubClient> jsonrpcClient;
struct JsonrpcFixture {
JsonrpcFixture()
@@ -58,10 +59,10 @@ struct JsonrpcFixture {
web3.setIdealPeerCount(5);
web3.ethereum()->setForceMining(true);
- jsonrpcServer = auto_ptr<EthStubServer>(new EthStubServer(new jsonrpc::CorsHttpServer(8080), web3));
+ jsonrpcServer = auto_ptr<WebThreeStubServer>(new WebThreeStubServer(new jsonrpc::CorsHttpServer(8080), web3));
jsonrpcServer->StartListening();
- jsonrpcClient = auto_ptr<EthStubClient>(new EthStubClient(new jsonrpc::HttpClient("http://localhost:8080")));
+ jsonrpcClient = auto_ptr<WebThreeStubClient>(new WebThreeStubClient(new jsonrpc::HttpClient("http://localhost:8080")));
}
~JsonrpcFixture()
{
@@ -322,7 +323,6 @@ BOOST_AUTO_TEST_CASE(jsonrpc_transact)
BOOST_CHECK_EQUAL(txAmount, jsToU256(messages[0u]["value"].asString()));
}
-
}
#endif