OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
uhs/twophase/locking_shard/interface.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 "interface.hpp"
7
9
10#include <utility>
11
12namespace cbdc::locking_shard {
13 interface::interface(std::pair<uint8_t, uint8_t> output_range)
14 : m_output_range(std::move(output_range)) {}
15
16 auto interface::hash_in_shard_range(const hash_t& h) const -> bool {
17 return config::hash_in_shard_range(m_output_range, h);
18 }
19
20 auto tx::operator==(const tx& rhs) const -> bool {
21 return m_tx == rhs.m_tx;
22 }
23}
virtual auto hash_in_shard_range(const hash_t &h) const -> bool
Returns whether a given hash is within the shard's range.
Tools for reading options from a configuration file and building application-specific parameter sets ...
auto hash_in_shard_range(const shard_range_t &range, const hash_t &val) -> bool
Checks if a hash is in the given range handled.
Definition config.cpp:736
std::array< unsigned char, cbdc::hash_size > hash_t
SHA256 hash container.
Transaction type processed by locking shards.
auto operator==(const tx &rhs) const -> bool