Unsubscribe from topics without leaving them
Opened this issue · 0 comments
rodrigo-o commented
This was a TODO comment on attestations that impacts also sync_committees, right now to unsubscribe from a topi we need to leave an rejoin:
@spec stop_collecting(non_neg_integer()) ::
{:ok, list(Types.Attestation.t())} | {:error, String.t()}
def stop_collecting(subnet_id) do
topic = topic(subnet_id)
Libp2pPort.leave_topic(topic)
Libp2pPort.join_topic(topic)
SyncSubnetInfo.stop_collecting(subnet_id)
end