OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
uhs/twophase/coordinator/interface.hpp
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#ifndef OPENCBDC_TX_SRC_COORDINATOR_INTERFACE_H_
7#define OPENCBDC_TX_SRC_COORDINATOR_INTERFACE_H_
8
10
11#include <functional>
12
13namespace cbdc::coordinator {
20 class interface {
21 public:
22 virtual ~interface() = default;
23 interface() = default;
24 interface(const interface&) = delete;
25 auto operator=(const interface&) -> interface& = delete;
26 interface(interface&&) = delete;
27 auto operator=(interface&&) -> interface& = delete;
28
30 using callback_type = std::function<void(std::optional<bool>)>;
31
42 callback_type result_callback) -> bool
43 = 0;
44 };
45}
46
47#endif
auto operator=(interface &&) -> interface &=delete
auto operator=(const interface &) -> interface &=delete
virtual auto execute_transaction(transaction::compact_tx tx, callback_type result_callback) -> bool=0
Execute the given compact transaction.
interface(interface &&)=delete
interface(const interface &)=delete
virtual ~interface()=default
std::function< void(std::optional< bool >)> callback_type
Signature of callback function for a transaction execution result.
A condensed, hash-only transaction representation.