20 #ifndef RIPPLE_APP_CONSENSUS_RCLCXTX_H_INCLUDED
21 #define RIPPLE_APP_CONSENSUS_RCLCXTX_H_INCLUDED
23 #include <ripple/app/misc/CanonicalTXSet.h>
24 #include <ripple/basics/chrono.h>
25 #include <ripple/protocol/UintTypes.h>
26 #include <ripple/shamap/SHAMap.h>
45 RCLCxTx(boost::intrusive_ptr<SHAMapItem const> txn) :
tx_(
std::move(txn))
57 boost::intrusive_ptr<SHAMapItem const>
tx_;
104 return map_->delItem(entry);
133 return map_->hasItem(entry);
147 boost::intrusive_ptr<SHAMapItem const>
const&
150 return map_->peekItem(entry);
157 return map_->getHash().as_uint256();
175 map_->compare(*(j.
map_), delta, 65536);
178 for (
auto const& [k, v] : delta)
180 assert((v.first && !v.second) || (v.second && !v.first));
182 ret[k] =
static_cast<bool>(v.first);
RCLTxSet(MutableTxSet const &m)
Constructor from a previously created MutableTxSet.
bool insert(Tx const &t)
Insert a new transaction into the set.
uint256 ID
Unique identifier/hash of transaction.
MutableTxSet(RCLTxSet const &src)
std::shared_ptr< SHAMap > map_
The SHAMap representing the transactions.
std::shared_ptr< SHAMap > map_
The SHAMap representing the transactions.
RCLCxTx(boost::intrusive_ptr< SHAMapItem const > txn)
Constructor.
bool exists(Tx::ID const &entry) const
Test if a transaction is in the set.
Represents a set of transactions in RCLConsensus.
ID id() const
The unique ID/hash of the transaction set.
boost::intrusive_ptr< SHAMapItem const > const & find(Tx::ID const &entry) const
Lookup a transaction.
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.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool erase(Tx::ID const &entry)
Remove a transaction from the set.
uint256 ID
Unique identifier/hash of the set of transactions.
Represents a transaction in RCLConsensus.
boost::intrusive_ptr< SHAMapItem const > tx_
The SHAMapItem that represents the transaction.
ID const & id() const
The unique identifier/hash of the transaction.