Example #1
0
 // A possible attack can happen if the last node to commit is malicious and either sends change view after his
 // commit to stall nodes in a higher view, or if he refuses to send recovery messages. In addition, if a node
 // asking change views loses network or crashes and comes back when nodes are committed in more than one higher
 // numbered view, it is possible for the node accepting recovery to commit in any of the higher views, thus
 // potentially splitting nodes among views and stalling the network.
 public static bool MoreThanFNodesCommittedOrLost(this IConsensusContext context) => (context.CountCommitted() + context.CountFailed()) > context.F();