Skip to content

Commit

Permalink
Fix consensus change view (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Apr 8, 2019
1 parent ef4cfcd commit a69b0ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neo/Consensus/ConsensusService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void CheckCommits()

private void CheckExpectedView(byte viewNumber)
{
if (context.ViewNumber == viewNumber) return;
if (context.ViewNumber >= viewNumber) return;
// if there are `M` change view payloads with NewViewNumber greater than viewNumber, then, it is safe to move
if (context.ChangeViewPayloads.Count(p => p != null && p.GetDeserializedMessage<ChangeView>().NewViewNumber >= viewNumber) >= context.M())
{
Expand Down

0 comments on commit a69b0ce

Please sign in to comment.