Closed vidhiJain closed 7 years ago
Are we assuming that the request from the same candidate may reach a node more than once?
A Candidate requests vote only once for a term. The underlying communication layer may forward the same packet twice to a follower. In this case, the follower vote is counted twice. It may lead to two candidates to be elected to a term. We should only check for
votedFor == None
Made the changes.
https://github.com/abhishekgupta-1/FUCloud/blob/2d36fe6f780a234158eafeadf379d7f263ff1a14/server.py#L170