20#ifndef RIPPLE_APP_CONSENSUS_RCLCXTX_H_INCLUDED
21#define RIPPLE_APP_CONSENSUS_RCLCXTX_H_INCLUDED
23#include <xrpld/shamap/SHAMap.h>
42 RCLCxTx(boost::intrusive_ptr<SHAMapItem const> txn) :
tx_(
std::move(txn))
54 boost::intrusive_ptr<SHAMapItem const>
tx_;
101 return map_->delItem(entry);
112 map_,
"ripple::RCLTxSet::MutableTxSet::RCLTxSet : non-null input");
131 return map_->hasItem(entry);
145 boost::intrusive_ptr<SHAMapItem const>
const&
148 return map_->peekItem(entry);
155 return map_->getHash().as_uint256();
173 map_->compare(*(j.
map_), delta, 65536);
176 for (
auto const& [k, v] : delta)
179 (v.first && !v.second) || (v.second && !v.first),
180 "ripple::RCLTxSet::compare : either side is set");
182 ret[k] =
static_cast<bool>(v.first);
Represents a transaction in RCLConsensus.
ID const & id() const
The unique identifier/hash of the transaction.
RCLCxTx(boost::intrusive_ptr< SHAMapItem const > txn)
Constructor.
boost::intrusive_ptr< SHAMapItem const > tx_
The SHAMapItem that represents the transaction.
uint256 ID
Unique identifier/hash of transaction.
MutableTxSet(RCLTxSet const &src)
bool insert(Tx const &t)
Insert a new transaction into the set.
bool erase(Tx::ID const &entry)
Remove a transaction from the set.
std::shared_ptr< SHAMap > map_
The SHAMap representing the transactions.
Represents a set of transactions in RCLConsensus.
bool exists(Tx::ID const &entry) const
Test if a transaction is in the set.
RCLTxSet(MutableTxSet const &m)
Constructor from a previously created MutableTxSet.
RCLTxSet(std::shared_ptr< SHAMap > m)
Constructor.
boost::intrusive_ptr< SHAMapItem const > const & find(Tx::ID const &entry) const
Lookup a transaction.
uint256 ID
Unique identifier/hash of the set of transactions.
ID id() const
The unique ID/hash of the transaction set.
std::map< Tx::ID, bool > compare(RCLTxSet const &j) const
Find transactions not in common between this and another transaction set.
std::shared_ptr< SHAMap > map_
The SHAMap representing the transactions.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.