Skip to content

fix: handle_gossip_message nesting store into a tuple #1443

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

Merged
merged 2 commits into from
Apr 23, 2025
Merged
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion lib/lambda_ethereum_consensus/p2p/gossip/blob_sidecar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule LambdaEthereumConsensus.P2P.Gossip.BlobSideCar do
Logger.debug("[Gossip] Blob sidecar received, with index #{blob_index}")
Libp2pPort.validate_message(msg_id, :accept)
# TODO: (#1406) Enhance the API to reduce unnecessary wrappers (:ok + list)
PendingBlocks.process_blobs(store, {:ok, [blob]})
PendingBlocks.process_blobs(store, {:ok, [blob]}) |> then(&elem(&1, 1))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this return an {:error, reason} in which case we'll be returning the reason here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PendingBlocks.process_blobs returns the previous store as {:ok, store} even if the blob isn't processed

else
{:error, reason} ->
Logger.warning("[Gossip] Blob rejected, reason: #{inspect(reason)}")
Expand Down
Loading