20#include <xrpld/app/consensus/RCLCensorshipDetector.h>
22#include <xrpl/beast/unit_test.h>
43 for (
auto const& i : proposed)
53 if (
std::find(remove.begin(), remove.end(),
id) != remove.end())
59 if (it != remain.
end())
67 BEAST_EXPECT(remain.
empty());
79 test(cdet, ++round, {}, {}, {}, {});
80 test(cdet, ++round, {10, 11, 12, 13}, {11, 2}, {10, 13}, {});
81 test(cdet, ++round, {10, 13, 14, 15}, {14}, {10, 13, 15}, {});
82 test(cdet, ++round, {10, 13, 15, 16}, {15, 16}, {10, 13}, {});
83 test(cdet, ++round, {10, 13}, {17, 18}, {10, 13}, {});
84 test(cdet, ++round, {10, 19}, {}, {10, 19}, {});
85 test(cdet, ++round, {10, 19, 20}, {20}, {10}, {19});
86 test(cdet, ++round, {21}, {21}, {}, {});
87 test(cdet, ++round, {}, {22}, {}, {});
88 test(cdet, ++round, {23, 24, 25, 26}, {25, 27}, {23, 26}, {24});
89 test(cdet, ++round, {23, 26, 28}, {26, 28}, {23}, {});
91 for (
int i = 0; i != 10; ++i)
92 test(cdet, ++round, {23}, {}, {23}, {});
94 test(cdet, ++round, {23, 29}, {29}, {23}, {});
95 test(cdet, ++round, {30, 31}, {31}, {30}, {});
96 test(cdet, ++round, {30}, {30}, {}, {});
97 test(cdet, ++round, {}, {}, {}, {});
testcase_t testcase
Memberspace for declaring test cases.
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.
void test(RCLCensorshipDetector< int, int > &cdet, int round, std::vector< int > proposed, std::vector< int > accepted, std::vector< int > remain, std::vector< int > remove)
void run() override
Runs the suite.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
@ accepted
Manifest is valid.
@ proposal
proposal for signing
Set the sequence number on a JTx.