17TEST(ByzantineFailureSimTest, DISABLED_byzantine_failure_sim)
30 PeerGroup a = sim.createGroup(1);
31 PeerGroup b = sim.createGroup(1);
32 PeerGroup c = sim.createGroup(1);
33 PeerGroup d = sim.createGroup(1);
34 PeerGroup e = sim.createGroup(1);
35 PeerGroup f = sim.createGroup(1);
36 PeerGroup g = sim.createGroup(1);
38 a.trustAndConnect(a + b + c + g, delay);
39 b.trustAndConnect(b + a + c + d + e, delay);
40 c.trustAndConnect(c + a + b + d + e, delay);
41 d.trustAndConnect(d + b + c + e + f, delay);
42 e.trustAndConnect(e + b + c + d + f, delay);
43 f.trustAndConnect(f + d + e + g, delay);
44 g.trustAndConnect(g + a + f, delay);
46 PeerGroup
const network = a + b + c + d + e + f + g;
50 sim.collectors.add(sc);
52 for (TrustGraph<Peer*>::ForkInfo
const& fi : sim.trustGraph.forkablePairs(0.8))
54 std::cout <<
"Can fork " << PeerGroup{fi.unlA} <<
" "
55 <<
" " << PeerGroup{fi.unlB} <<
" overlap " << fi.overlap <<
" required "
56 << fi.required <<
"\n";
62 PeerGroup byzantineNodes = a + b + c + g;
64 for (Peer* peer : network)
69 if (byzantineNodes.contains(peer))
71 peer->txInjections.emplace(peer->lastClosedLedger.seq(), Tx{42});
75 std::cout <<
"Branches: " << sim.branches() <<
"\n";