diff --git a/apps/omg_child_chain/lib/omg_child_chain/coordinator_setup.ex b/apps/omg_child_chain/lib/omg_child_chain/coordinator_setup.ex index 5a7e2b8bed..14073b60f4 100644 --- a/apps/omg_child_chain/lib/omg_child_chain/coordinator_setup.ex +++ b/apps/omg_child_chain/lib/omg_child_chain/coordinator_setup.ex @@ -33,9 +33,9 @@ defmodule OMG.ChildChain.CoordinatorSetup do ], %{ depositor: [finality_margin: deposit_finality_margin], - exiter: [waits_for: :depositor, finality_margin: 0], - in_flight_exit: [waits_for: :depositor, finality_margin: 0], - piggyback: [waits_for: :in_flight_exit, finality_margin: 0] + exiter: [waits_for: :depositor, finality_margin: deposit_finality_margin], + in_flight_exit: [waits_for: :depositor, finality_margin: deposit_finality_margin], + piggyback: [waits_for: :in_flight_exit, finality_margin: deposit_finality_margin] }} end end diff --git a/apps/omg_child_chain/test/omg_child_chain/supervisor_test.exs b/apps/omg_child_chain/test/omg_child_chain/supervisor_test.exs index b1af58e946..8c7af3e6b7 100644 --- a/apps/omg_child_chain/test/omg_child_chain/supervisor_test.exs +++ b/apps/omg_child_chain/test/omg_child_chain/supervisor_test.exs @@ -39,25 +39,25 @@ defmodule OMG.ChildChain.SupervisorTest do # start - only depositor and getter allowed to move assert %{sync_height: 9, root_chain_height: 9} = Core.get_synced_info(state, pid[:depositor]) - assert %{sync_height: 0, root_chain_height: 10} = Core.get_synced_info(state, pid[:exiter]) - assert %{sync_height: 0, root_chain_height: 10} = Core.get_synced_info(state, pid[:in_flight_exit]) + assert %{sync_height: 0, root_chain_height: 9} = Core.get_synced_info(state, pid[:exiter]) + assert %{sync_height: 0, root_chain_height: 9} = Core.get_synced_info(state, pid[:in_flight_exit]) # depositor advances assert {:ok, state} = Core.check_in(state, pid[:depositor], 10, :depositor) - assert %{sync_height: 10, root_chain_height: 10} = Core.get_synced_info(state, pid[:exiter]) - assert %{sync_height: 10, root_chain_height: 10} = Core.get_synced_info(state, pid[:in_flight_exit]) + assert %{sync_height: 9, root_chain_height: 9} = Core.get_synced_info(state, pid[:exiter]) + assert %{sync_height: 9, root_chain_height: 9} = Core.get_synced_info(state, pid[:in_flight_exit]) # in_flight_exit advances - assert %{sync_height: 0, root_chain_height: 10} = Core.get_synced_info(state, pid[:piggyback]) + assert %{sync_height: 0, root_chain_height: 9} = Core.get_synced_info(state, pid[:piggyback]) assert {:ok, state} = Core.check_in(state, pid[:in_flight_exit], 10, :in_flight_exit) - assert %{sync_height: 10, root_chain_height: 10} = Core.get_synced_info(state, pid[:piggyback]) + assert %{sync_height: 9, root_chain_height: 9} = Core.get_synced_info(state, pid[:piggyback]) # root chain advances assert {:ok, state} = Core.update_root_chain_height(state, 100) assert %{sync_height: 99, root_chain_height: 99} = Core.get_synced_info(state, pid[:depositor]) - assert %{sync_height: 10, root_chain_height: 100} = Core.get_synced_info(state, pid[:exiter]) - assert %{sync_height: 10, root_chain_height: 100} = Core.get_synced_info(state, pid[:in_flight_exit]) - assert %{sync_height: 10, root_chain_height: 100} = Core.get_synced_info(state, pid[:piggyback]) + assert %{sync_height: 10, root_chain_height: 99} = Core.get_synced_info(state, pid[:exiter]) + assert %{sync_height: 10, root_chain_height: 99} = Core.get_synced_info(state, pid[:in_flight_exit]) + assert %{sync_height: 10, root_chain_height: 99} = Core.get_synced_info(state, pid[:piggyback]) end defp initial_check_in(state, services, pid) do