20 #include <ripple/app/consensus/RCLCensorshipDetector.h>
21 #include <ripple/beast/unit_test.h>
41 for (
auto const& i : proposed)
51 if (
std::find(remove.begin(), remove.end(),
id) != remove.end())
57 if (it != remain.
end())
65 BEAST_EXPECT(remain.
empty());
72 testcase(
"Censorship Detector");
77 test(cdet, ++round, {}, {}, {}, {});
78 test(cdet, ++round, {10, 11, 12, 13}, {11, 2}, {10, 13}, {});
79 test(cdet, ++round, {10, 13, 14, 15}, {14}, {10, 13, 15}, {});
80 test(cdet, ++round, {10, 13, 15, 16}, {15, 16}, {10, 13}, {});
81 test(cdet, ++round, {10, 13}, {17, 18}, {10, 13}, {});
82 test(cdet, ++round, {10, 19}, {}, {10, 19}, {});
83 test(cdet, ++round, {10, 19, 20}, {20}, {10}, {19});
84 test(cdet, ++round, {21}, {21}, {}, {});
85 test(cdet, ++round, {}, {22}, {}, {});
86 test(cdet, ++round, {23, 24, 25, 26}, {25, 27}, {23, 26}, {24});
87 test(cdet, ++round, {23, 26, 28}, {26, 28}, {23}, {});
89 for (
int i = 0; i != 10; ++i)
90 test(cdet, ++round, {23}, {}, {23}, {});
92 test(cdet, ++round, {23, 29}, {29}, {23}, {});
93 test(cdet, ++round, {30, 31}, {31}, {30}, {});
94 test(cdet, ++round, {30}, {30}, {}, {});
95 test(cdet, ++round, {}, {}, {}, {});