From 1646bc57eae9880fd408d23ca692364dc6fd6442 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 11 Oct 2018 15:11:52 +0200 Subject: Move somme functionnality to SNet.Manager --- shard/lib/app/identity.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shard/lib/app/identity.ex') diff --git a/shard/lib/app/identity.ex b/shard/lib/app/identity.ex index d2748a1..391d37e 100644 --- a/shard/lib/app/identity.ex +++ b/shard/lib/app/identity.ex @@ -84,14 +84,14 @@ defmodule SApp.Identity do end def handle_cast(:init_pull, state) do - for {_, pid, _} <- Shard.Manager.list_connections do + for {_, pid, _} <- SNet.Manager.list_connections do GenServer.cast(pid, {:send_msg, {:interested, [state.id]}}) end {:noreply, state} end def handle_cast({:interested, peer_pid, _auth}, state) do - Shard.Manager.send_pid(peer_pid, {state.id, nil, {:update, SData.SignRev.signed(state.state)}}) + SNet.Manager.send_pid(peer_pid, {state.id, nil, {:update, SData.SignRev.signed(state.state)}}) {:noreply, state} end @@ -115,7 +115,7 @@ defmodule SApp.Identity do def bcast_state(state, exclude \\ []) do for peer_id <- Shard.Manager.get_shard_peers(state.id) do if not Enum.member? exclude, peer_id do - Shard.Manager.send(peer_id, {state.id, nil, {:update, SData.SignRev.signed(state.state)}}) + SNet.Manager.send(peer_id, {state.id, nil, {:update, SData.SignRev.signed(state.state)}}) end end end -- cgit v1.2.3