aboutsummaryrefslogtreecommitdiff
path: root/src/consensus
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-30 22:12:58 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-30 22:12:58 +0000
commit15fd206932cd17d570c198733301049bf1296b1d (patch)
tree777cf0811572fa27bc8799493b53c82792f76e76 /src/consensus
parenta0feef53d9f3a04c65a870e2a2b9f8b850bedc0a (diff)
downloadgnunet-15fd206932cd17d570c198733301049bf1296b1d.tar.gz
gnunet-15fd206932cd17d570c198733301049bf1296b1d.zip
-fixing build issues in consensus related to #3047
Diffstat (limited to 'src/consensus')
-rw-r--r--src/consensus/gnunet-consensus-profiler.c1
-rw-r--r--src/consensus/gnunet-service-consensus.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c
index def3012a3..00e017246 100644
--- a/src/consensus/gnunet-consensus-profiler.c
+++ b/src/consensus/gnunet-consensus-profiler.c
@@ -24,7 +24,6 @@
24 * @author Florian Dold 24 * @author Florian Dold
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_common.h"
28#include "gnunet_util_lib.h" 27#include "gnunet_util_lib.h"
29#include "gnunet_consensus_service.h" 28#include "gnunet_consensus_service.h"
30#include "gnunet_testbed_service.h" 29#include "gnunet_testbed_service.h"
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c
index 97cfc414f..765178b5e 100644
--- a/src/consensus/gnunet-service-consensus.c
+++ b/src/consensus/gnunet-service-consensus.c
@@ -25,10 +25,9 @@
25 */ 25 */
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_common.h" 28#include "gnunet_util_lib.h"
29#include "gnunet_protocols.h" 29#include "gnunet_protocols.h"
30#include "gnunet_applications.h" 30#include "gnunet_applications.h"
31#include "gnunet_util_lib.h"
32#include "gnunet_set_service.h" 31#include "gnunet_set_service.h"
33#include "gnunet_consensus_service.h" 32#include "gnunet_consensus_service.h"
34#include "consensus_protocol.h" 33#include "consensus_protocol.h"
@@ -811,17 +810,20 @@ get_peer_idx (const struct GNUNET_PeerIdentity *peer, const struct ConsensusSess
811 * @param session_id local id of the consensus session 810 * @param session_id local id of the consensus session
812 */ 811 */
813static void 812static void
814compute_global_id (struct ConsensusSession *session, const struct GNUNET_HashCode *session_id) 813compute_global_id (struct ConsensusSession *session,
814 const struct GNUNET_HashCode *session_id)
815{ 815{
816 int i; 816 int i;
817 struct GNUNET_HashCode tmp; 817 struct GNUNET_HashCode tmp;
818 struct GNUNET_HashCode phash;
818 819
819 /* FIXME: use kdf? */ 820 /* FIXME: use kdf? */
820 821
821 session->global_id = *session_id; 822 session->global_id = *session_id;
822 for (i = 0; i < session->num_peers; ++i) 823 for (i = 0; i < session->num_peers; ++i)
823 { 824 {
824 GNUNET_CRYPTO_hash_xor (&session->global_id, &session->info[i].peer_id.hashPubKey, &tmp); 825 GNUNET_CRYPTO_hash (&session->info[i].peer_id, sizeof (struct GNUNET_PeerIdentity), &phash);
826 GNUNET_CRYPTO_hash_xor (&session->global_id, &phash, &tmp);
825 session->global_id = tmp; 827 session->global_id = tmp;
826 GNUNET_CRYPTO_hash (&session->global_id, sizeof (struct GNUNET_PeerIdentity), &tmp); 828 GNUNET_CRYPTO_hash (&session->global_id, sizeof (struct GNUNET_PeerIdentity), &tmp);
827 session->global_id = tmp; 829 session->global_id = tmp;