diff --git a/src/machi_chain_manager1.erl b/src/machi_chain_manager1.erl index 8d181cf..82d48ab 100644 --- a/src/machi_chain_manager1.erl +++ b/src/machi_chain_manager1.erl @@ -344,7 +344,7 @@ code_change(_OldVsn, S, _Extra) -> make_none_projection(MyName, All_list, MembersDict) -> Down_list = All_list, UPI_list = [], - machi_projection:new(MyName, MembersDict, UPI_list, Down_list, [], []). + machi_projection:new(MyName, MembersDict, Down_list, UPI_list, [], []). get_my_private_proj_boot_info(MgrOpts, DefaultDict, DefaultProj) -> get_my_proj_boot_info(MgrOpts, DefaultDict, DefaultProj, private). diff --git a/src/machi_projection.erl b/src/machi_projection.erl index f70408f..d9b1523 100644 --- a/src/machi_projection.erl +++ b/src/machi_projection.erl @@ -35,7 +35,7 @@ %% @doc Create a new projection record. -new(MyName, MemberDict, UPI_list, Down_list, Repairing_list, Ps) -> +new(MyName, MemberDict, Down_list, UPI_list, Repairing_list, Ps) -> new(0, MyName, MemberDict, Down_list, UPI_list, Repairing_list, Ps). %% @doc Create a new projection record. diff --git a/test/machi_projection_test.erl b/test/machi_projection_test.erl index e2ed93e..b961e3b 100644 --- a/test/machi_projection_test.erl +++ b/test/machi_projection_test.erl @@ -78,9 +78,12 @@ compare_test() -> try_it(MyName, All_list, UPI_list, Down_list, Repairing_list, Ps) -> try - P = machi_projection:new(MyName, All_list, UPI_list, Down_list, + P = machi_projection:new(MyName, All_list, Down_list, UPI_list, Repairing_list, Ps), - is_record(P, projection_v1) + Down_list = P#projection_v1.down, + UPI_list = P#projection_v1.upi, + Repairing_list = P#projection_v1.repairing, + true catch _:_ -> false end.