[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28564 - gnunet/src/consensus
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28564 - gnunet/src/consensus |
Date: |
Tue, 13 Aug 2013 13:14:52 +0200 |
Author: dold
Date: 2013-08-13 13:14:52 +0200 (Tue, 13 Aug 2013)
New Revision: 28564
Modified:
gnunet/src/consensus/gnunet-service-consensus.c
gnunet/src/consensus/test_consensus.conf
Log:
- disable nse in the profiler config
- handle ghost peers correctly in exchange round
Modified: gnunet/src/consensus/gnunet-service-consensus.c
===================================================================
--- gnunet/src/consensus/gnunet-service-consensus.c 2013-08-13 11:12:47 UTC
(rev 28563)
+++ gnunet/src/consensus/gnunet-service-consensus.c 2013-08-13 11:14:52 UTC
(rev 28564)
@@ -493,6 +493,9 @@
while (largest_arc < session->num_peers)
largest_arc <<= 1;
num_ghosts = largest_arc - session->num_peers;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "largest arc: %u\n", largest_arc);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "arc: %u\n", arc);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "num ghosts: %u\n", num_ghosts);
if (0 == (my_idx & arc))
{
@@ -509,18 +512,22 @@
int ghost_partner_idx;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "my index %d, arc %d, peers %u\n",
my_idx, arc, session->num_peers);
ghost_partner_idx = (my_idx - (int) arc) % (int) session->num_peers;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ghost partner is before %d\n",
ghost_partner_idx);
/* platform dependent; modulo sometimes returns negative values */
if (ghost_partner_idx < 0)
ghost_partner_idx += session->num_peers;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ghost partner is after %d\n",
ghost_partner_idx);
- session->partner_incoming =
&session->info[session->shuffle[ghost_partner_idx]];
- session->partner_incoming->exp_subround_finished = GNUNET_NO;
- return;
+ /* we only need to have a ghost partner if the partner is outgoing */
+ if (0 == (ghost_partner_idx & arc))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ghost partner is %d\n",
ghost_partner_idx);
+ session->partner_incoming =
&session->info[session->shuffle[ghost_partner_idx]];
+ session->partner_incoming->exp_subround_finished = GNUNET_NO;
+ return;
+ }
}
session->partner_incoming = NULL;
return;
}
+ /* we only have an incoming connection */
partner_idx = (my_idx - (int) arc) % (int) session->num_peers;
if (partner_idx < 0)
partner_idx += session->num_peers;
Modified: gnunet/src/consensus/test_consensus.conf
===================================================================
--- gnunet/src/consensus/test_consensus.conf 2013-08-13 11:12:47 UTC (rev
28563)
+++ gnunet/src/consensus/test_consensus.conf 2013-08-13 11:14:52 UTC (rev
28564)
@@ -43,3 +43,6 @@
# Do we use addresses from localhost address ranges? (::1, 127.0.0.0/8)
RETURN_LOCAL_ADDRESSES = YES
+[nse]
+AUTOSTART = NO
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28564 - gnunet/src/consensus,
gnunet <=