22 #include <boost/test/unit_test.hpp> 23 #include <boost/lexical_cast.hpp> 37 #include <jsonrpccpp/server/connectors/httpserver.h> 38 #include <jsonrpccpp/client/connectors/httpclient.h> 56 unique_ptr<ModularServer<rpc::EthFace, rpc::WhisperFace, rpc::NetFace, rpc::Web3Face, rpc::AdminNetFace, rpc::AdminUtilsFace>>
modularServer;
66 static string const c_version(
"shhrpc-web3");
67 static unsigned const c_ttl = 777000;
74 static bool setup =
false;
94 auto client =
new jsonrpc::HttpClient(
"http://localhost:8080");
112 msg[
"ttl"] =
toJS(c_ttl);
114 if (_payload.empty())
115 _payload =
string(
"0x") + h256::random().hex();
117 msg[
"payload"] = _payload;
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
TestOutputHelper testHelper
std::string const & clientVersion() const
unique_ptr< AccountHolder > accountHolder
eth::Client * ethereum() const
std::hash for asio::adress
Main API hub for interfacing with Web 3 components.
rpc::AdminNetFace * adminNetFace
unique_ptr< ModularServer< rpc::EthFace, rpc::WhisperFace, rpc::NetFace, rpc::Web3Face, rpc::AdminNetFace, rpc::AdminUtilsFace > > modularServer
High-level manager of password-encrypted keys for Ethereum.
std::string toJS(FixedHash< S > const &_h)
rpc::AdminUtilsFace * adminUtilsFace
unique_ptr< WebThreeStubClient > jsonrpcClient
#define BOOST_FIXTURE_TEST_SUITE(a, b)
This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
rpc::WhisperFace * whisperFace
#define BOOST_AUTO_TEST_SUITE_END()
void setIdealPeerCount(size_t _n) override
Sets the ideal number of peers.
static bool test_allowLocal
Setting true causes isAllowed to return true for all addresses. (Used by test fixtures) ...
Helper functions to work with json::spirit and test files.
Json::Value createMessage(string const &_from, string const &_to, string const &_topic="", string _payload="")