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_(org::xrpl::rpc::v1::XRPLedgerAPIService::NewStub(grpc::CreateChannel(
16 beast::IP::Endpoint(boost::asio::ip::make_address(getEnvLocalhostAddr()), std::stoi(port)).to_string(),
17 grpc::InsecureChannelCredentials())))
18 {
19 }
20
21 grpc::Status status;
22 grpc::ClientContext context;
24};
25
26} // namespace test
27} // 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:597
GRPCTestClientBase(std::string const &port)
std::unique_ptr< org::xrpl::rpc::v1::XRPLedgerAPIService::Stub > stub_