Skip to content

Commit

Permalink
mod m_consensusLeaderID by COMM_SIZE in case committee size less than…
Browse files Browse the repository at this point in the history
… the final epoch num per DS epoch
  • Loading branch information
kaikawaliu committed Apr 19, 2018
1 parent ff8faf1 commit 1ca74f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libNode/FinalBlockProcessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ void Node::UpdateStateForNextConsensusRound()

m_consensusLeaderID++;
m_consensusID++;
m_consensusLeaderID = m_consensusLeaderID % COMM_SIZE;

if (m_consensusMyID == m_consensusLeaderID)
{
Expand Down Expand Up @@ -1244,6 +1245,7 @@ bool Node::ProcessFinalBlock(const vector<unsigned char>& message,
{
m_consensusID++;
m_consensusLeaderID++;
m_consensusLeaderID = m_consensusLeaderID % COMM_SIZE;
}
#endif // IS_LOOKUP_NODE

Expand Down

0 comments on commit 1ca74f1

Please sign in to comment.