Fix initiating ballot after HigherBallot when HigherBallot is in fact no higher
This commit is contained in:
parent
09f005406a
commit
6757f2df8f
@ -95,6 +95,8 @@ namespace paxos
|
|||||||
void Legislator::receive_higher_ballot(int ballot)
|
void Legislator::receive_higher_ballot(int ballot)
|
||||||
{
|
{
|
||||||
int last_tried = ledger.last_tried();
|
int last_tried = ledger.last_tried();
|
||||||
|
if (last_tried > ballot)
|
||||||
|
return;
|
||||||
|
|
||||||
while (last_tried + (int)legislators.size() < ballot)
|
while (last_tried + (int)legislators.size() < ballot)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user