Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change EXIT_PROCESSOR_SLA_MARGIN to EXIT_PROCESSOR_SLA_SECONDS #1491

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
deab148
change EXIT_PROCESSOR_SLA_MARGIN to EXIT_PROCESSOR_SLA_SECONDS
souradeep-das Apr 27, 2020
6174271
remove eth-block-time and credo fix
souradeep-das Apr 27, 2020
db4f1a2
update- change cabbage sla_sec
souradeep-das Apr 27, 2020
85fc0f5
fixed- configuration_api_test
souradeep-das Apr 28, 2020
da7964a
fix barebone test
souradeep-das Apr 28, 2020
8e9a537
dummy
souradeep-das Apr 28, 2020
a250c93
add ETHEREUM_BLOCK_TIME_SECONDS to variables_test_barebone
souradeep-das Apr 29, 2020
a0c7d4f
revert mix lock
souradeep-das Apr 29, 2020
e074347
temp assigning ethereum_block_time_seconds which wont be used later
souradeep-das May 4, 2020
b2157c9
credo fix
souradeep-das May 4, 2020
dc32c7d
lint fix
souradeep-das May 4, 2020
9e42630
update sla_seconds for test.exs
souradeep-das May 5, 2020
43bd892
change: @system_env_name_margin to @system_env_name and @app_env_name…
souradeep-das May 5, 2020
b4c5342
remove single pipeline
souradeep-das May 5, 2020
545034d
revert mix lock
souradeep-das May 5, 2020
3d60044
merge master
souradeep-das May 17, 2020
c8ea7aa
merge changes from master
souradeep-das May 17, 2020
b25e4dc
get timestamp from eth_height
souradeep-das May 18, 2020
1ba1a3d
revert to eth_height_now
souradeep-das May 18, 2020
872f1b5
fix: change eth_height to eth_timestamp and fix tests
souradeep-das May 28, 2020
67d08db
fix: update eth_timestamp_now in finalization and core tests
souradeep-das May 28, 2020
eac77e0
Merge branch 'master' into souradeep/margin_to_seconds
souradeep-das May 28, 2020
84b4472
fix: get_block_timestamp in exit_processor
souradeep-das May 28, 2020
4a98cda
refactor: remove unix time usage
souradeep-das May 29, 2020
2b663c2
fix: get block_timestamp from opts for tests
souradeep-das May 29, 2020
99cf072
style: lint fix
souradeep-das May 29, 2020
8c072f9
style: remove unused vars
souradeep-das Jun 1, 2020
719e7b2
merge master
souradeep-das Jun 1, 2020
34cd035
style: fix lint
souradeep-das Jun 1, 2020
d11ba3e
Merge branch 'master' into souradeep/margin_to_seconds
souradeep-das Jun 8, 2020
49587d8
Merge branch 'master' into souradeep/margin_to_seconds
unnawut Jun 10, 2020
96d9e31
refactor: remove irrelevant guards
souradeep-das Jun 12, 2020
b64b5eb
fix: typo
souradeep-das Jun 12, 2020
c1a0770
style: lint fix
souradeep-das Jun 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge changes from master
  • Loading branch information
souradeep-das committed May 17, 2020
commit c8ea7aa053d22ae591a1b861279c21468df586ed
22 changes: 4 additions & 18 deletions apps/omg_watcher/lib/omg_watcher/exit_processor/core.ex
Original file line number Diff line number Diff line change
@@ -68,19 +68,15 @@ defmodule OMG.Watcher.ExitProcessor.Core do

@type new_piggyback_event_t() :: new_piggyback_input_event_t() | new_piggyback_output_event_t()

<<<<<<< HEAD
defstruct [:sla_seconds, exits: %{}, in_flight_exits: %{}, exit_ids: %{}, competitors: %{}]
=======
defstruct [
:sla_margin,
:sla_seconds,
:min_exit_period_seconds,
:child_block_interval,
exits: %{},
in_flight_exits: %{},
exit_ids: %{},
competitors: %{}
]
>>>>>>> master

@type t :: %__MODULE__{
sla_seconds: non_neg_integer(),
@@ -115,24 +111,18 @@ defmodule OMG.Watcher.ExitProcessor.Core do
db_exits :: [{{pos_integer, non_neg_integer, non_neg_integer}, map}],
db_in_flight_exits :: [{Transaction.tx_hash(), InFlightExitInfo.t()}],
db_competitors :: [{Transaction.tx_hash(), CompetitorInfo.t()}],
<<<<<<< HEAD
sla_seconds :: non_neg_integer
) :: {:ok, t()}
def init(db_exits, db_in_flight_exits, db_competitors, sla_seconds \\ @default_sla_seconds) do
=======
min_exit_period_seconds :: non_neg_integer(),
child_block_interval :: non_neg_integer,
sla_margin :: non_neg_integer
sla_seconds :: non_neg_integer
) :: {:ok, t()}
def init(
db_exits,
db_in_flight_exits,
db_competitors,
min_exit_period_seconds,
child_block_interval,
sla_margin \\ @default_sla_margin
sla_seconds \\ @default_sla_seconds
) do
>>>>>>> master
exits = db_exits |> Enum.map(&ExitInfo.from_db_kv/1) |> Map.new()

exit_ids = Enum.into(exits, %{}, fn {utxo_pos, %ExitInfo{exit_id: exit_id}} -> {exit_id, utxo_pos} end)
@@ -143,13 +133,9 @@ defmodule OMG.Watcher.ExitProcessor.Core do
in_flight_exits: db_in_flight_exits |> Enum.map(&InFlightExitInfo.from_db_kv/1) |> Map.new(),
exit_ids: exit_ids,
competitors: db_competitors |> Enum.map(&CompetitorInfo.from_db_kv/1) |> Map.new(),
<<<<<<< HEAD
sla_seconds: sla_seconds
=======
sla_margin: sla_margin,
sla_seconds: sla_seconds,
min_exit_period_seconds: min_exit_period_seconds,
child_block_interval: child_block_interval
>>>>>>> master
}}
end