Skip to content

Commit 0092970

Browse files
committed
chore: remove hardcoded values in agg proof periodic work
1 parent 3d72966 commit 0092970

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

explorer/lib/explorer/periodically.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defmodule Explorer.Periodically do
2424
:timer.send_interval(one_second * seconds_in_an_hour, :restakings)
2525

2626
# Fetch new aggregated proofs every 1 minute
27-
:timer.send_interval(one_second * 12, :aggregated_proofs)
27+
:timer.send_interval(one_second * 60, :aggregated_proofs)
2828
end
2929

3030
# Reads and process last blocks for operators and restaking changes
@@ -78,11 +78,11 @@ defmodule Explorer.Periodically do
7878
def handle_info(:aggregated_proofs, state) do
7979
# This task runs every hour
8080
# We read a bit more than 300 blocks (1hr) to make sure we don't lose any event
81-
read_block_qty = 5000
81+
read_block_qty = 310
8282
latest_block_number = AlignedLayerServiceManager.get_latest_block_number()
8383
read_from_block = max(0, latest_block_number - read_block_qty)
8484

85-
Task.start(fn -> process_aggregated_proofs(3_734_200, 3_734_500) end)
85+
Task.start(fn -> process_aggregated_proofs(read_from_block, latest_block_number) end)
8686

8787
{:noreply, state}
8888
end

0 commit comments

Comments
 (0)