rippled
Loading...
Searching...
No Matches
GRPCTestClientBase.h
1#ifndef XRPL_GRPCTESTCLIENTBASE_H
2#define XRPL_GRPCTESTCLIENTBASE_H
3
4#include <test/jtx/envconfig.h>
5
6#include <xrpl/proto/org/xrpl/rpc/v1/xrp_ledger.grpc.pb.h>
7
8#include <grpcpp/grpcpp.h>
9
10namespace ripple {
11namespace test {
12
14{
15 explicit GRPCTestClientBase(std::string const& port)
16 : stub_(org::xrpl::rpc::v1::XRPLedgerAPIService::NewStub(
17 grpc::CreateChannel(
18 beast::IP::Endpoint(
19 boost::asio::ip::make_address(getEnvLocalhostAddr()),
20 std::stoi(port))
21 .to_string(),
22 grpc::InsecureChannelCredentials())))
23 {
24 }
25
26 grpc::Status status;
27 grpc::ClientContext context;
29};
30
31} // namespace test
32} // namespace ripple
33#endif // XRPL_GRPCTESTCLIENTBASE_H
Set the expected result code for a JTx The test will fail if the code doesn't match.
Definition rpc.h:16
char const * getEnvLocalhostAddr()
Definition envconfig.h:17
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:611
STL namespace.
std::unique_ptr< org::xrpl::rpc::v1::XRPLedgerAPIService::Stub > stub_
GRPCTestClientBase(std::string const &port)