6#ifndef OPENCBDC_TX_SRC_LOCKING_SHARD_CLIENT_H_
7#define OPENCBDC_TX_SRC_LOCKING_SHARD_CLIENT_H_
26 client(std::vector<network::endpoint_t> endpoints,
27 const std::pair<uint8_t, uint8_t>& output_range,
51 -> std::optional<std::vector<bool>>
override;
60 const hash_t& dtx_id) ->
bool override;
72 auto send_request(
const request& req) -> std::optional<response>;
74 std::atomic_bool m_running{
true};
76 std::unique_ptr<cbdc::rpc::tcp_client<request, response>> m_client;
Interface for a locking shard.
RPC client for the mutable interface to a locking shard raft cluster.
void stop() override
Shuts down the client and unblocks any existing requests waiting for a response.
auto lock_outputs(std::vector< tx > &&txs, const hash_t &dtx_id) -> std::optional< std::vector< bool > > override
Issues a lock RPC to the remote shard and returns its response.
auto operator=(client &&) -> client &=delete
client(const client &)=delete
auto init() -> bool
Initializes the RPC client.
auto discard_dtx(const hash_t &dtx_id) -> bool override
Issues a discard RPC to the remote shard and returns its response.
auto apply_outputs(std::vector< bool > &&complete_txs, const hash_t &dtx_id) -> bool override
Issues an apply RPC to the remote shard and returns its response.
auto operator=(const client &) -> client &=delete
Generalized logging class.
std::array< unsigned char, cbdc::hash_size > hash_t
SHA256 hash container.