Skip to content

Commit

Permalink
fix download blob recursive calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkenan committed Jun 25, 2024
1 parent e289b6c commit f71bd46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/lambda_ethereum_consensus/p2p/blob_downloader.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ defmodule LambdaEthereumConsensus.P2P.BlobDownloader do

if retries > 0 do
Logger.debug("Retrying request for #{count} blobs", slot: slot)
request_blobs_by_range(slot, count, retries - 1)
request_blobs_by_range(slot, count, on_blobs, retries - 1)
else
on_blobs.({:error, reason})
end
Expand Down Expand Up @@ -99,7 +99,7 @@ defmodule LambdaEthereumConsensus.P2P.BlobDownloader do

if retries > 0 do
Logger.debug("Retrying request for blobs.")
request_blobs_by_root(identifiers, retries - 1)
request_blobs_by_root(identifiers, on_blobs, retries - 1)
else
on_blobs.({:error, reason})
end
Expand Down
2 changes: 1 addition & 1 deletion lib/lambda_ethereum_consensus/p2p/block_downloader.ex
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ defmodule LambdaEthereumConsensus.P2P.BlockDownloader do
:telemetry.execute([:network, :request], %{blocks: 0}, Map.put(tags, :result, "retry"))
pretty_roots = Enum.map_join(roots, ", ", &Base.encode16/1)
Logger.debug("Retrying request for blocks with roots #{pretty_roots}")
request_blocks_by_root(roots, retries - 1)
request_blocks_by_root(roots, on_blocks, retries - 1)
else
:telemetry.execute([:network, :request], %{blocks: 0}, Map.put(tags, :result, "error"))
on_blocks.({:error, reason})
Expand Down

0 comments on commit f71bd46

Please sign in to comment.