1#ifndef XRPL_APP_CONSENSUS_RCLCENSORSHIPDETECTOR_H_INCLUDED
2#define XRPL_APP_CONSENSUS_RCLCENSORSHIPDETECTOR_H_INCLUDED
4#include <xrpl/basics/algorithm.h>
5#include <xrpl/shamap/SHAMap.h>
13template <
class TxID,
class Sequence>
39 return lhs.
txid < rhs;
45 return lhs < rhs.
txid;
74 [](
auto& x,
auto const& y) { x.seq = y.seq; },
75 [](
auto const& x,
auto const& y) { return x.txid < y.txid; });
92 template <
class Predicate>
108 [&pred](
auto const& x) { return pred(x.txid, x.seq); },
void reset()
Removes all elements from the tracker.
RCLCensorshipDetector()=default
friend bool operator<(TxIDSeq const &lhs, TxIDSeq const &rhs)
void check(std::vector< TxID > accepted, Predicate &&pred)
Determine which transactions made it and perform censorship detection.
void propose(TxIDSeqVec proposed)
Add transactions being proposed for the current consensus round.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void generalized_set_intersection(InputIter1 first1, InputIter1 last1, InputIter2 first2, InputIter2 last2, Action action, Comp comp)
@ accepted
Manifest is valid.
FwdIter1 remove_if_intersect_or_match(FwdIter1 first1, FwdIter1 last1, InputIter2 first2, InputIter2 last2, Pred pred, Comp comp)
TxIDSeq(TxID const &txid_, Sequence const &seq_)