This commit is contained in:
@@ -125,7 +125,7 @@ defmodule PaxosTestAditional do
|
||||
IO.puts("#{inspect(name)}: started")
|
||||
|
||||
[leader | spare] = Enum.sort(participants)
|
||||
increase_ballot = Enum.take(spare, floor(length(participants) / 2) + 1)
|
||||
increase_ballot = Enum.take(spare, floor(length(participants) / 2))
|
||||
|
||||
if name == leader do
|
||||
# Propose when passed with :kill_before_decision will die right before a decision is selected
|
||||
@@ -199,7 +199,7 @@ defmodule PaxosTestAditional do
|
||||
participants = Enum.sort(participants)
|
||||
|
||||
[leader | spare ] = participants
|
||||
increase_ballot = Enum.take(spare, floor(length(participants) / 2) + 1)
|
||||
increase_ballot = Enum.take(spare, floor(length(participants) / 2))
|
||||
[non_leader | _] = Enum.reverse(spare)
|
||||
|
||||
if name == non_leader do
|
||||
|
||||
Reference in New Issue
Block a user