rippled
Loading...
Searching...
No Matches
GRPCTestClientBase.h
1#pragma once
2
3#include <test/jtx/envconfig.h>
4
5#include <xrpl/proto/org/xrpl/rpc/v1/xrp_ledger.grpc.pb.h>
6
7#include <grpcpp/grpcpp.h>
8
9namespace xrpl {
10namespace test {
11
13{
14 explicit GRPCTestClientBase(std::string const& port)
15 : stub_(
16 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 xrpl
Set the expected result code for a JTx The test will fail if the code doesn't match.
Definition rpc.h:15
STL namespace.
char const * getEnvLocalhostAddr()
Definition envconfig.h:16
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:602
GRPCTestClientBase(std::string const &port)
std::unique_ptr< org::xrpl::rpc::v1::XRPLedgerAPIService::Stub > stub_