OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
uhs/twophase/locking_shard/format.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 "format.hpp"
7
10
11namespace cbdc {
12 auto operator<<(serializer& packet, const locking_shard::tx& tx)
13 -> serializer& {
14 return packet << tx.m_tx;
15 }
16
18 return packet >> tx.m_tx;
19 }
20
22 -> serializer& {
23 return packet << p.m_dtx_id << p.m_params;
24 }
25
27 -> serializer& {
28 return packet >> p.m_dtx_id >> p.m_params;
29 }
30
31 auto operator<<(serializer& packet,
33 -> serializer& {
34 return packet << p.m_tx_id;
35 }
36
37 auto operator>>(serializer& packet,
39 return packet >> p.m_tx_id;
40 }
41
42 auto operator<<(serializer& packet,
44 -> serializer& {
45 return packet << p.m_uhs_id;
46 }
47
48 auto operator>>(serializer& packet,
50 return packet >> p.m_uhs_id;
51 }
52}
Interface for serializing objects into and out of raw bytes representations.
auto operator>>(serializer &deser, parsec::agent::rpc::request &req) -> serializer &
auto operator<<(serializer &ser, const parsec::agent::rpc::request &req) -> serializer &
RPC message for clients to use to request the status of a TX ID.
RPC message for clients to use to request the status of a UHS ID.
Transaction type processed by locking shards.