6#ifndef OPENCBDC_TX_SRC_LOCKING_SHARD_LOCKING_SHARD_INTERFACE_H_ 
    7#define OPENCBDC_TX_SRC_LOCKING_SHARD_LOCKING_SHARD_INTERFACE_H_ 
   35        explicit interface(std::pair<uint8_t, uint8_t> output_range);
 
   54            -> std::optional<std::vector<bool>> = 0;
 
   66                                   const hash_t& dtx_id) -> 
bool 
   87        std::pair<uint8_t, uint8_t> m_output_range;
 
 
Interface for a locking shard.
 
virtual void stop()=0
Stops the locking shard implementation from processing further commands and unblocks any pending comm...
 
auto operator=(interface &&) -> interface &=delete
 
virtual auto lock_outputs(std::vector< tx > &&txs, const hash_t &dtx_id) -> std::optional< std::vector< bool > >=0
Attempts to lock the input hashes for the given vector of transactions.
 
interface(interface &&)=delete
 
virtual auto apply_outputs(std::vector< bool > &&complete_txs, const hash_t &dtx_id) -> bool=0
Completes a previous lock operation by deleting input hashes and creating output hashes,...
 
auto operator=(const interface &) -> interface &=delete
 
virtual ~interface()=default
 
interface(const interface &)=delete
 
virtual auto discard_dtx(const hash_t &dtx_id) -> bool=0
Discards any cached information about a given distributed transaction.
 
virtual auto hash_in_shard_range(const hash_t &h) const -> bool
Returns whether a given hash is within the shard's range.
 
std::array< unsigned char, cbdc::hash_size > hash_t
SHA256 hash container.
 
Transaction type processed by locking shards.
 
transaction::compact_tx m_tx
Compact TX.
 
auto operator==(const tx &rhs) const -> bool
 
A condensed, hash-only transaction representation.