Skip to content

Commit

Permalink
Greater than F nodes must have committed for it to not be possible fo…
Browse files Browse the repository at this point in the history
…r changing view and coming to consensus.
  • Loading branch information
jsolman committed Mar 19, 2019
1 parent bfb729e commit 76bd576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neo/Consensus/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal static class Helper
// 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 and commit in any of the higher views, thus
// potentially splitting nodes among views and stalling the network.
public static bool FNodesCommitted(this IConsensusContext context) => context.CommitPayloads.Count(p => p != null) >= context.F();
public static bool FNodesCommitted(this IConsensusContext context) => context.CommitPayloads.Count(p => p != null) > context.F();

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint GetPrimaryIndex(this IConsensusContext context, byte viewNumber)
Expand Down

0 comments on commit 76bd576

Please sign in to comment.