 						calculate_total_weights(from_identity_id, state, uuid)
 				end
 			end)
-			Democracy.CalculateResultServer.set_traverse_incoming_delegations(uuid, identity_id)
+			Democracy.CalculateResultServer.add_visited(uuid, identity_id)
 		end
 	end
 

	def calculate_total_weights(identity_id, state, uuid) do
		{inverse_delegations, votes, topics, trust_identity_ids} = state

		unless Democracy.CalculateResultServer.traversed_incoming_delegations?(uuid, identity_id) do
			inverse_delegations |> Map.get(identity_id, []) |> Enum.each(fn({from_identity_id, from_weight, from_topics}) ->
				cond do
					not MapSet.member?(trust_identity_ids, from_identity_id) -> nil

		end)
	end

	def visited?(uuid, identity_id) do
		Agent.get(uuid, fn({powers, weights, done_ids}) ->
			MapSet.member?(done_ids, identity_id)
		end)
	end

	def add_visited(uuid, identity_id) do
		Agent.update(uuid, fn({powers, weights, done_ids}) ->
			{powers, weights, MapSet.put(done_ids, identity_id)}
		end)
	end

	def reset_visited(uuid) do
		Agent.update(uuid, fn({powers, weights, done_ids}) ->
			{powers, weights, MapSet.new}
		end)
	end
end
