Skip to content

Commit

Permalink
Removed a TODO related to coun unneeded for sync contributions
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-o committed Sep 12, 2024
1 parent 7696fd7 commit 28eb3d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/lambda_ethereum_consensus/p2p/gossip/operations_collector.ex
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ defmodule LambdaEthereumConsensus.P2P.Gossip.OperationsCollector do

@spec get_sync_committee_contributions() :: list(Types.SignedContributionAndProof.t())
def get_sync_committee_contributions() do
# TODO: count is not needed, for now it's just here to match the other functions
get_operation(:sync_committee_contribution, 1_000)
get_operation(:sync_committee_contribution, :all)
end

@spec notify_new_block(Types.BeaconBlock.t()) :: :ok
Expand Down Expand Up @@ -139,10 +138,11 @@ defmodule LambdaEthereumConsensus.P2P.Gossip.OperationsCollector do

slot = fetch_slot!()

operations =
fetch_operation!(operation) |> Stream.reject(&ignore?(&1, slot)) |> Enum.take(count)
operations = fetch_operation!(operation)

operations
if count == :all,
do: operations |> Enum.reject(&ignore?(&1, slot)),
else: operations |> Stream.reject(&ignore?(&1, slot)) |> Enum.take(count)
end

@impl true
Expand Down

0 comments on commit 28eb3d0

Please sign in to comment.