3#include <xrpl/basics/base_uint.h>
4#include <xrpl/beast/utility/instrumentation.h>
5#include <xrpl/shamap/SHAMap.h>
6#include <xrpl/shamap/SHAMapItem.h>
7#include <xrpl/shamap/SHAMapTreeNode.h>
34 RCLCxTx(boost::intrusive_ptr<SHAMapItem const> txn) :
tx(
std::move(txn))
41 [[nodiscard]]
ID const&
50 boost::intrusive_ptr<SHAMapItem const>
tx;
106 return map_->delItem(entry);
117 XRPL_ASSERT(
map,
"xrpl::RCLTxSet::MutableTxSet::RCLTxSet : non-null input");
138 return map->hasItem(entry);
153 [[nodiscard]] boost::intrusive_ptr<SHAMapItem const>
const&
156 return map->peekItem(entry);
165 return map->getHash().asUInt256();
184 map->compare(*(j.
map), delta, 65536);
187 for (
auto const& [k, v] : delta)
190 (v.first && !v.second) || (v.second && !v.first),
191 "xrpl::RCLTxSet::compare : either side is set");
193 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.