OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
uhs/twophase/coordinator/server.cpp
Go to the documentation of this file.
1// Copyright (c) 2021 MIT Digital Currency Initiative,
2// Federal Reserve Bank of Boston
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6#include "server.hpp"
7
10 interface* impl,
12 : m_impl(impl),
13 m_srv(std::move(srv)) {
14 m_srv->register_handler_callback(
15 [&](request req,
16 std::function<void(std::optional<bool>)> callback) {
17 return m_impl->execute_transaction(std::move(req),
18 std::move(callback));
19 });
20 }
21}
virtual auto execute_transaction(transaction::compact_tx tx, callback_type result_callback) -> bool=0
Execute the given compact transaction.
server(interface *impl, std::unique_ptr< cbdc::rpc::async_server< request, response > > srv)
Constructor.
Generic asynchronous RPC server.
A condensed, hash-only transaction representation.