unsigned int sampler_size_est_need;
/**
- * Time inverval the do_round task runs in.
+ * Time interval the do_round task runs in.
*/
struct GNUNET_TIME_Relative round_interval;
for ( i = 0 ; i < *list_size ; i++ )
{
- if (0 == GNUNET_CRYPTO_cmp_peer_identity (&tmp[i], peer))
+ if (0 == GNUNET_memcmp (&tmp[i], peer))
{
if (i < *list_size -1)
{ /* Not at the last entry -- shift peers left */
* messages to it */
//indicate_sending_intention (peer);
}
+ if (sub == msub)
+ {
+ GNUNET_STATISTICS_update (stats,
+ "# observed peers in gossip",
+ 1,
+ GNUNET_NO);
+ }
#ifdef TO_FILE
sub->num_observed_peers++;
GNUNET_CONTAINER_multipeermap_put
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
uint32_t num_observed_unique_peers =
GNUNET_CONTAINER_multipeermap_size (sub->observed_unique_peers);
+ GNUNET_STATISTICS_set (stats,
+ "# unique peers in gossip",
+ num_observed_unique_peers,
+ GNUNET_NO);
#ifdef TO_FILE_FULL
to_file (sub->file_name_observed_log,
"%" PRIu32 " %" PRIu32 " %f\n",
"Going to remove send channel to peer %s\n",
GNUNET_i2s (peer));
#if ENABLE_MALICIOUS
- if (0 != GNUNET_CRYPTO_cmp_peer_identity (&attacked_peer,
+ if (0 != GNUNET_memcmp (&attacked_peer,
peer))
(void) destroy_sending_channel (get_peer_ctx (sub->peer_map,
peer));
else if (2 == mal_type)
{ /* Try to partition network */
- if (0 == GNUNET_CRYPTO_cmp_peer_identity (&attacked_peer, peer))
+ if (0 == GNUNET_memcmp (&attacked_peer, peer))
{
send_pull_reply (peer_ctx, mal_peers, num_mal_peers);
}