From f21fcdd7be57f80e228b52dc2f379baa67051494 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Sat, 29 Aug 2015 13:13:23 +0900 Subject: [PATCH] Bugfix: none proj must flap, undo previous commits, which may cause mess later --- src/machi_chain_manager1.erl | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/machi_chain_manager1.erl b/src/machi_chain_manager1.erl index 051352e..b34d268 100644 --- a/src/machi_chain_manager1.erl +++ b/src/machi_chain_manager1.erl @@ -2294,10 +2294,9 @@ calculate_flaps(P_newprop, P_latest, _P_current, CurrentUp, _FlapLimit, {_N, _} -> ?REACT({calculate_flaps,?LINE,[]}), false - end - andalso - %% If P_newprop is the none projection, do not start flapping. - P_newprop#projection_v1.upi /= [], + end, + %% TODO: 2015-08-29: Grr, we really need CP cases of none projection + %% flapping to propagate problem_with information. LeaveFlapping_p = if LastUpChange_diff < 3.0 -> @@ -2311,10 +2310,13 @@ calculate_flaps(P_newprop, P_latest, _P_current, CurrentUp, _FlapLimit, %% that intent. ?REACT({calculate_flaps,?LINE,[]}), false; - AmFlappingNow_p andalso - P_newprop#projection_v1.upi == [] -> - %% P_newprop is the none projection, stop flapping. - true; + %% TODO: 2015-08-29: Grr, we really need CP cases of none projection + %% flapping to propagate problem_with information. + %% AmFlappingNow_p andalso + %% P_newprop#projection_v1.upi == [] -> + %% %% P_newprop is the none projection, stop flapping. + %% ?REACT({calculate_flaps,?LINE,[]}), + %% true; AmFlappingNow_p andalso CurrentUp /= FlapLastUp -> ?REACT({calculate_flaps,?LINE,[{manifesto_clause,{leave,1}}]}),