From 82b67262616091ba3cbfae0785575ef5fa138b59 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Thu, 6 Aug 2015 15:21:44 +0900 Subject: [PATCH] Revert UPI [] -> [FirstRepairing] to commit 91496c6 --- src/machi_chain_manager1.erl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/machi_chain_manager1.erl b/src/machi_chain_manager1.erl index 083805b..0ab531f 100644 --- a/src/machi_chain_manager1.erl +++ b/src/machi_chain_manager1.erl @@ -666,17 +666,13 @@ calc_projection(_OldThreshold, _NoPartitionThreshold, LastProj, TentativeUPI = NewUPI_list3, TentativeRepairing = Repairing_list5, - AllTentativeUPI_witnesses_p = - lists:all(fun(X) -> lists:member(X, OldWitness_list) end, - TentativeUPI), {NewUPI, NewRepairing} = - if (TentativeUPI == [] orelse AllTentativeUPI_witnesses_p) - andalso TentativeRepairing /= [] -> - %% UPI is empty or all in UPI are witnesses, so grab + if TentativeUPI == [] andalso TentativeRepairing /= [] -> + %% UPI is empty (not including witnesses), so grab %% the first from the repairing list and make it the %% only non-witness in the UPI. [FirstRepairing|TailRepairing] = TentativeRepairing, - {TentativeUPI ++ [FirstRepairing], TailRepairing}; + {[FirstRepairing], TailRepairing}; true -> {TentativeUPI, TentativeRepairing} end,