diff --git a/lib/paxos.ex b/lib/paxos.ex index ee02c74..69b3b2a 100644 --- a/lib/paxos.ex +++ b/lib/paxos.ex @@ -335,7 +335,7 @@ defmodule Paxos do {:get_value, inst, pid_to_inform} -> # IO.puts("#{state.name} get_value") if has_finished(state, inst, true) do - send(pid_to_inform, {:get_value_res_actual, inst, state.decided[inst]}) + send(pid_to_inform, {:get_value_res, inst, state.decided[inst]}) end state @@ -511,10 +511,7 @@ defmodule Paxos do {_, t} = input receive do {:get_value_res, inst} -> - check_and_apply(nil, inst, input, &get_decision_loop/1) - - {:get_value_res_actual, inst, v} -> - check_and_apply(v, inst, input, &get_decision_loop/1) + check_and_apply(inst, inst, input, &get_decision_loop/1) x -> Process.send_after(self(), x, 500)