20 #include <ripple/beast/unit_test.h>
21 #include <ripple/app/consensus/RCLCensorshipDetector.h>
37 for (
auto const& i : proposed)
45 [&remove, &remain](
auto id,
auto seq)
49 if (
std::find(remove.begin(), remove.end(),
id) != remove.end())
55 if (it != remain.
end())
63 BEAST_EXPECT(remain.
empty());
70 testcase (
"Censorship Detector");
75 test(cdet, ++round, { }, { }, { }, { });
76 test(cdet, ++round, { 10, 11, 12, 13 }, { 11, 2 }, { 10, 13 }, { });
77 test(cdet, ++round, { 10, 13, 14, 15 }, { 14 }, { 10, 13, 15 }, { });
78 test(cdet, ++round, { 10, 13, 15, 16 }, { 15, 16 }, { 10, 13 }, { });
79 test(cdet, ++round, { 10, 13 }, { 17, 18 }, { 10, 13 }, { });
80 test(cdet, ++round, { 10, 19 }, { }, { 10, 19 }, { });
81 test(cdet, ++round, { 10, 19, 20 }, { 20 }, { 10 }, { 19 });
82 test(cdet, ++round, { 21 }, { 21 }, { }, { });
83 test(cdet, ++round, { }, { 22 }, { }, { });
84 test(cdet, ++round, { 23, 24, 25, 26 }, { 25, 27 }, { 23, 26 }, { 24 });
85 test(cdet, ++round, { 23, 26, 28 }, { 26, 28 }, { 23 }, { });
87 for (
int i = 0; i != 10; ++i)
88 test(cdet, ++round, { 23 }, { }, { 23 }, { });
90 test(cdet, ++round, { 23, 29 }, { 29 }, { 23 }, { });
91 test(cdet, ++round, { 30, 31 }, { 31 }, { 30 }, { });
92 test(cdet, ++round, { 30 }, { 30 }, { }, { });
93 test(cdet, ++round, { }, { }, { }, { });