Skip to content

Commit

Permalink
fixup! test: get tests to pass without setting NONCE_LIMITER_RESET_FR…
Browse files Browse the repository at this point in the history
…EQUENCY
  • Loading branch information
JamesPiechota committed Dec 24, 2024
1 parent 7f357e1 commit c2f6c19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-module(ar_nonce_limiter_server_sup).
-module(ar_nonce_limiter_sup).

-behaviour(supervisor).

Expand Down Expand Up @@ -26,7 +26,7 @@ init([]) ->
ignore;
true ->
{ok, Config} = application:get_env(arweave, config),
Workers = lists:map(
ServerWorkers = lists:map(
fun(Peer) ->
Name = list_to_atom("ar_nonce_limiter_server_worker_"
++ ar_util:peer_to_str(Peer)),
Expand All @@ -35,6 +35,10 @@ init([]) ->
end,
Config#config.nonce_limiter_client_peers
),
Workers2 = [?CHILD(ar_nonce_limiter_server, worker) | Workers],
{ok, {{one_for_one, 5, 10}, Workers2}}
Client = ?CHILD_SUP(ar_nonce_limiter_client, worker),
Server = ?CHILD(ar_nonce_limiter_server, worker),
NonceLimiter = ?CHILD(ar_nonce_limiter, worker),

Workers = [Client | ServerWorkers] ++ [Server, NonceLimiter],
{ok, {{one_for_one, 5, 10}, Workers}}
end.
4 changes: 1 addition & 3 deletions apps/arweave/src/ar_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ init([]) ->
?CHILD_SUP(ar_chunk_storage_sup, supervisor),
?CHILD_SUP(ar_verify_chunks_sup, supervisor),
?CHILD(ar_global_sync_record, worker),
?CHILD_SUP(ar_nonce_limiter_server_sup, supervisor),
?CHILD(ar_nonce_limiter, worker),
?CHILD_SUP(ar_nonce_limiter_client, worker),
?CHILD_SUP(ar_nonce_limiter_sup, supervisor),
?CHILD_SUP(ar_mining_sup, supervisor),
?CHILD(ar_coordination, worker),
?CHILD_SUP(ar_tx_emitter_sup, supervisor),
Expand Down

0 comments on commit c2f6c19

Please sign in to comment.