3#include <xrpl/shamap/SHAMap.h>
22 RCLCxTx(boost::intrusive_ptr<SHAMapItem const> txn) :
tx(
std::move(txn))
27 [[nodiscard]]
ID const&
34 boost::intrusive_ptr<SHAMapItem const>
tx;
81 return map_->delItem(entry);
91 XRPL_ASSERT(
map,
"xrpl::RCLTxSet::MutableTxSet::RCLTxSet : non-null input");
110 return map->hasItem(entry);
124 [[nodiscard]] boost::intrusive_ptr<SHAMapItem const>
const&
127 return map->peekItem(entry);
134 return map->getHash().asUInt256();
152 map->compare(*(j.
map), delta, 65536);
155 for (
auto const& [k, v] : delta)
158 (v.first && !v.second) || (v.second && !v.first),
159 "xrpl::RCLTxSet::compare : either side is set");
161 ret[k] =
static_cast<bool>(v.first);
Represents a transaction in RCLConsensus.
boost::intrusive_ptr< SHAMapItem const > tx
The SHAMapItem that represents the transaction.
RCLCxTx(boost::intrusive_ptr< SHAMapItem const > txn)
Constructor.
ID const & id() const
The unique identifier/hash of 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.
std::shared_ptr< SHAMap > map_
The SHAMap representing the transactions.
bool erase(Tx::ID const &entry)
Remove a transaction from the set.
uint256 ID
Unique identifier/hash of the set of transactions.
boost::intrusive_ptr< SHAMapItem const > const & find(Tx::ID const &entry) const
Lookup a transaction.
RCLTxSet(MutableTxSet const &m)
Constructor from a previously created MutableTxSet.
bool exists(Tx::ID const &entry) const
Test if a transaction is in the set.
RCLCxTx Tx
The type that corresponds to a single transaction.
ID id() const
The unique ID/hash of the transaction set.
std::shared_ptr< SHAMap > map
The SHAMap representing the transactions.
std::map< Tx::ID, bool > compare(RCLTxSet const &j) const
Find transactions not in common between this and another transaction set.
RCLTxSet(std::shared_ptr< SHAMap > m)
Constructor.
std::map< uint256, DeltaItem > Delta
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.