aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-06-18 02:42:06 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-06-18 02:42:06 +0200
commit5086d45a1e477db25f8aa84a53dd3afd32cb0ceb (patch)
tree873a617353cbb986161011e887a9a8cefe233d26 /src
parentab4573d4f7dafe44d414a6d1f23397682ac0ca70 (diff)
downloadgnunet-5086d45a1e477db25f8aa84a53dd3afd32cb0ceb.tar.gz
gnunet-5086d45a1e477db25f8aa84a53dd3afd32cb0ceb.zip
consensus/set: saner log levels
Diffstat (limited to 'src')
-rw-r--r--src/consensus/gnunet-service-consensus.c34
-rw-r--r--src/set/gnunet-service-set_union.c16
2 files changed, 25 insertions, 25 deletions
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c
index 6b76efb18..990d94954 100644
--- a/src/consensus/gnunet-service-consensus.c
+++ b/src/consensus/gnunet-service-consensus.c
@@ -693,7 +693,7 @@ send_to_client_iter (void *cls,
693 GNUNET_assert (GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT == element->element_type); 693 GNUNET_assert (GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT == element->element_type);
694 ce = element->data; 694 ce = element->data;
695 695
696 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "marker is %u\n", (unsigned) ce->marker); 696 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "marker is %u\n", (unsigned) ce->marker);
697 697
698 if (0 != ce->marker) 698 if (0 != ce->marker)
699 return GNUNET_YES; 699 return GNUNET_YES;
@@ -988,7 +988,7 @@ set_result_cb (void *cls,
988 988
989 if ( (NULL != consensus_element) && (0 != consensus_element->marker) ) 989 if ( (NULL != consensus_element) && (0 != consensus_element->marker) )
990 { 990 {
991 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 991 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
992 "P%u: got some marker\n", 992 "P%u: got some marker\n",
993 session->local_peer_idx); 993 session->local_peer_idx);
994 if ( (GNUNET_YES == setop->transceive_contested) && 994 if ( (GNUNET_YES == setop->transceive_contested) &&
@@ -1002,7 +1002,7 @@ set_result_cb (void *cls,
1002 if (CONSENSUS_MARKER_SIZE == consensus_element->marker) 1002 if (CONSENSUS_MARKER_SIZE == consensus_element->marker)
1003 { 1003 {
1004 1004
1005 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1005 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1006 "P%u: got size marker\n", 1006 "P%u: got size marker\n",
1007 session->local_peer_idx); 1007 session->local_peer_idx);
1008 1008
@@ -1018,7 +1018,7 @@ set_result_cb (void *cls,
1018 uint64_t *copy = GNUNET_memdup (session->first_sizes_received, sizeof (uint64_t) * session->num_peers); 1018 uint64_t *copy = GNUNET_memdup (session->first_sizes_received, sizeof (uint64_t) * session->num_peers);
1019 qsort (copy, session->num_peers, sizeof (uint64_t), cmp_uint64_t); 1019 qsort (copy, session->num_peers, sizeof (uint64_t), cmp_uint64_t);
1020 session->lower_bound = copy[session->num_peers / 3 + 1]; 1020 session->lower_bound = copy[session->num_peers / 3 + 1];
1021 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1021 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1022 "P%u: lower bound %llu\n", 1022 "P%u: lower bound %llu\n",
1023 session->local_peer_idx, 1023 session->local_peer_idx,
1024 (long long) session->lower_bound); 1024 (long long) session->lower_bound);
@@ -1045,7 +1045,7 @@ set_result_cb (void *cls,
1045 NULL, 1045 NULL,
1046 NULL); 1046 NULL);
1047#ifdef GNUNET_EXTRA_LOGGING 1047#ifdef GNUNET_EXTRA_LOGGING
1048 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1048 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1049 "P%u: adding element %s into set {%s} of task {%s}\n", 1049 "P%u: adding element %s into set {%s} of task {%s}\n",
1050 session->local_peer_idx, 1050 session->local_peer_idx,
1051 debug_str_element (element), 1051 debug_str_element (element),
@@ -1057,7 +1057,7 @@ set_result_cb (void *cls,
1057 { 1057 {
1058 diff_insert (output_diff, 1, element); 1058 diff_insert (output_diff, 1, element);
1059#ifdef GNUNET_EXTRA_LOGGING 1059#ifdef GNUNET_EXTRA_LOGGING
1060 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1060 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1061 "P%u: adding element %s into diff {%s} of task {%s}\n", 1061 "P%u: adding element %s into diff {%s} of task {%s}\n",
1062 session->local_peer_idx, 1062 session->local_peer_idx,
1063 debug_str_element (element), 1063 debug_str_element (element),
@@ -1069,7 +1069,7 @@ set_result_cb (void *cls,
1069 { 1069 {
1070 rfn_vote (output_rfn, task_other_peer (task), VOTE_ADD, element); 1070 rfn_vote (output_rfn, task_other_peer (task), VOTE_ADD, element);
1071#ifdef GNUNET_EXTRA_LOGGING 1071#ifdef GNUNET_EXTRA_LOGGING
1072 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1072 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1073 "P%u: adding element %s into rfn {%s} of task {%s}\n", 1073 "P%u: adding element %s into rfn {%s} of task {%s}\n",
1074 session->local_peer_idx, 1074 session->local_peer_idx,
1075 debug_str_element (element), 1075 debug_str_element (element),
@@ -1096,7 +1096,7 @@ set_result_cb (void *cls,
1096 NULL, 1096 NULL,
1097 NULL); 1097 NULL);
1098#ifdef GNUNET_EXTRA_LOGGING 1098#ifdef GNUNET_EXTRA_LOGGING
1099 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1099 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1100 "P%u: removing element %s from set {%s} of task {%s}\n", 1100 "P%u: removing element %s from set {%s} of task {%s}\n",
1101 session->local_peer_idx, 1101 session->local_peer_idx,
1102 debug_str_element (element), 1102 debug_str_element (element),
@@ -1108,7 +1108,7 @@ set_result_cb (void *cls,
1108 { 1108 {
1109 diff_insert (output_diff, -1, element); 1109 diff_insert (output_diff, -1, element);
1110#ifdef GNUNET_EXTRA_LOGGING 1110#ifdef GNUNET_EXTRA_LOGGING
1111 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1111 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1112 "P%u: removing element %s from diff {%s} of task {%s}\n", 1112 "P%u: removing element %s from diff {%s} of task {%s}\n",
1113 session->local_peer_idx, 1113 session->local_peer_idx,
1114 debug_str_element (element), 1114 debug_str_element (element),
@@ -1120,7 +1120,7 @@ set_result_cb (void *cls,
1120 { 1120 {
1121 rfn_vote (output_rfn, task_other_peer (task), VOTE_REMOVE, element); 1121 rfn_vote (output_rfn, task_other_peer (task), VOTE_REMOVE, element);
1122#ifdef GNUNET_EXTRA_LOGGING 1122#ifdef GNUNET_EXTRA_LOGGING
1123 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1123 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1124 "P%u: removing element %s from rfn {%s} of task {%s}\n", 1124 "P%u: removing element %s from rfn {%s} of task {%s}\n",
1125 session->local_peer_idx, 1125 session->local_peer_idx,
1126 debug_str_element (element), 1126 debug_str_element (element),
@@ -1348,7 +1348,7 @@ commit_set (struct ConsensusSession *session,
1348 .size = 0, 1348 .size = 0,
1349 .sender_index = 0 1349 .sender_index = 0
1350 }; 1350 };
1351 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "inserting size marker\n"); 1351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "inserting size marker\n");
1352 cse.ce.marker = CONSENSUS_MARKER_SIZE; 1352 cse.ce.marker = CONSENSUS_MARKER_SIZE;
1353 cse.size = GNUNET_htonll (session->first_size); 1353 cse.size = GNUNET_htonll (session->first_size);
1354 cse.sender_index = session->local_peer_idx; 1354 cse.sender_index = session->local_peer_idx;
@@ -1424,7 +1424,7 @@ commit_set (struct ConsensusSession *session,
1424 } 1424 }
1425 GNUNET_SET_add_element (set->h, &element, NULL, NULL); 1425 GNUNET_SET_add_element (set->h, &element, NULL, NULL);
1426#ifdef GNUNET_EXTRA_LOGGING 1426#ifdef GNUNET_EXTRA_LOGGING
1427 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1427 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1428 "P%u: evil peer: cramming element %s into set {%s} of task {%s}\n", 1428 "P%u: evil peer: cramming element %s into set {%s} of task {%s}\n",
1429 session->local_peer_idx, 1429 session->local_peer_idx,
1430 debug_str_element (&element), 1430 debug_str_element (&element),
@@ -1439,7 +1439,7 @@ commit_set (struct ConsensusSession *session,
1439 GNUNET_SET_commit (setop->op, set->h); 1439 GNUNET_SET_commit (setop->op, set->h);
1440 break; 1440 break;
1441 case EVILNESS_SLACK: 1441 case EVILNESS_SLACK:
1442 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1442 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1443 "P%u: evil peer: slacking\n", 1443 "P%u: evil peer: slacking\n",
1444 (unsigned int) session->local_peer_idx); 1444 (unsigned int) session->local_peer_idx);
1445 /* Do nothing. */ 1445 /* Do nothing. */
@@ -1895,7 +1895,7 @@ task_start_apply_round (struct TaskEntry *task)
1895 ri->element, 1895 ri->element,
1896 &set_mutation_done, 1896 &set_mutation_done,
1897 progress_cls)); 1897 progress_cls));
1898 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1898 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1899 "P%u: apply round: adding element %s with %u-majority.\n", 1899 "P%u: apply round: adding element %s with %u-majority.\n",
1900 session->local_peer_idx, 1900 session->local_peer_idx,
1901 debug_str_element (ri->element), majority_num); 1901 debug_str_element (ri->element), majority_num);
@@ -1907,13 +1907,13 @@ task_start_apply_round (struct TaskEntry *task)
1907 ri->element, 1907 ri->element,
1908 &set_mutation_done, 1908 &set_mutation_done,
1909 progress_cls)); 1909 progress_cls));
1910 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1910 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1911 "P%u: apply round: deleting element %s with %u-majority.\n", 1911 "P%u: apply round: deleting element %s with %u-majority.\n",
1912 session->local_peer_idx, 1912 session->local_peer_idx,
1913 debug_str_element (ri->element), majority_num); 1913 debug_str_element (ri->element), majority_num);
1914 break; 1914 break;
1915 case VOTE_STAY: 1915 case VOTE_STAY:
1916 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1916 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1917 "P%u: apply round: keeping element %s with %u-majority.\n", 1917 "P%u: apply round: keeping element %s with %u-majority.\n",
1918 session->local_peer_idx, 1918 session->local_peer_idx,
1919 debug_str_element (ri->element), majority_num); 1919 debug_str_element (ri->element), majority_num);
@@ -2382,7 +2382,7 @@ finish_task (struct TaskEntry *task)
2382 2382
2383 task->step->finished_tasks++; 2383 task->step->finished_tasks++;
2384 2384
2385 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2385 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
2386 "P%u: Finishing setop in Task {%s} (now %u/%u tasks finished in step)\n", 2386 "P%u: Finishing setop in Task {%s} (now %u/%u tasks finished in step)\n",
2387 task->step->session->local_peer_idx, 2387 task->step->session->local_peer_idx,
2388 debug_str_task_key (&task->key), 2388 debug_str_task_key (&task->key),
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c
index 3e18bf08e..077b899f6 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -769,7 +769,7 @@ send_full_element_iterator (void *cls,
769 struct GNUNET_SET_Element *el = &ee->element; 769 struct GNUNET_SET_Element *el = &ee->element;
770 struct GNUNET_MQ_Envelope *ev; 770 struct GNUNET_MQ_Envelope *ev;
771 771
772 LOG (GNUNET_ERROR_TYPE_INFO, 772 LOG (GNUNET_ERROR_TYPE_DEBUG,
773 "Sending element %s\n", 773 "Sending element %s\n",
774 GNUNET_h2s (key)); 774 GNUNET_h2s (key));
775 ev = GNUNET_MQ_msg_extra (emsg, 775 ev = GNUNET_MQ_msg_extra (emsg,
@@ -796,7 +796,7 @@ send_full_set (struct Operation *op)
796 struct GNUNET_MQ_Envelope *ev; 796 struct GNUNET_MQ_Envelope *ev;
797 797
798 op->state->phase = PHASE_FULL_SENDING; 798 op->state->phase = PHASE_FULL_SENDING;
799 LOG (GNUNET_ERROR_TYPE_INFO, 799 LOG (GNUNET_ERROR_TYPE_DEBUG,
800 "Dedicing to transmit the full set\n"); 800 "Dedicing to transmit the full set\n");
801 /* FIXME: use a more memory-friendly way of doing this with an 801 /* FIXME: use a more memory-friendly way of doing this with an
802 iterator, just as we do in the non-full case! */ 802 iterator, just as we do in the non-full case! */
@@ -924,7 +924,7 @@ handle_union_p2p_strata_estimator (void *cls,
924 (diff > op->state->initial_size / 4) || 924 (diff > op->state->initial_size / 4) ||
925 (0 == other_size) ) 925 (0 == other_size) )
926 { 926 {
927 LOG (GNUNET_ERROR_TYPE_INFO, 927 LOG (GNUNET_ERROR_TYPE_DEBUG,
928 "Deciding to go for full set transmission (diff=%d, own set=%u)\n", 928 "Deciding to go for full set transmission (diff=%d, own set=%u)\n",
929 diff, 929 diff,
930 op->state->initial_size); 930 op->state->initial_size);
@@ -941,7 +941,7 @@ handle_union_p2p_strata_estimator (void *cls,
941 { 941 {
942 struct GNUNET_MQ_Envelope *ev; 942 struct GNUNET_MQ_Envelope *ev;
943 943
944 LOG (GNUNET_ERROR_TYPE_INFO, 944 LOG (GNUNET_ERROR_TYPE_DEBUG,
945 "Telling other peer that we expect its full set\n"); 945 "Telling other peer that we expect its full set\n");
946 op->state->phase = PHASE_EXPECT_IBF; 946 op->state->phase = PHASE_EXPECT_IBF;
947 ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SET_UNION_P2P_REQUEST_FULL); 947 ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SET_UNION_P2P_REQUEST_FULL);
@@ -1299,7 +1299,7 @@ handle_union_p2p_ibf (void *cls,
1299 else 1299 else
1300 { 1300 {
1301 GNUNET_assert (op->state->phase == PHASE_EXPECT_IBF_CONT); 1301 GNUNET_assert (op->state->phase == PHASE_EXPECT_IBF_CONT);
1302 LOG (GNUNET_ERROR_TYPE_INFO, 1302 LOG (GNUNET_ERROR_TYPE_DEBUG,
1303 "Received more of IBF\n"); 1303 "Received more of IBF\n");
1304 } 1304 }
1305 GNUNET_assert (NULL != op->state->remote_ibf); 1305 GNUNET_assert (NULL != op->state->remote_ibf);
@@ -1761,7 +1761,7 @@ handle_union_p2p_inquiry (void *cls,
1761 const struct IBF_Key *ibf_key; 1761 const struct IBF_Key *ibf_key;
1762 unsigned int num_keys; 1762 unsigned int num_keys;
1763 1763
1764 LOG (GNUNET_ERROR_TYPE_INFO, 1764 LOG (GNUNET_ERROR_TYPE_DEBUG,
1765 "Received union inquiry\n"); 1765 "Received union inquiry\n");
1766 num_keys = (ntohs (msg->header.size) - sizeof (struct InquiryMessage)) 1766 num_keys = (ntohs (msg->header.size) - sizeof (struct InquiryMessage))
1767 / sizeof (struct IBF_Key); 1767 / sizeof (struct IBF_Key);
@@ -1829,7 +1829,7 @@ handle_union_p2p_request_full (void *cls,
1829{ 1829{
1830 struct Operation *op = cls; 1830 struct Operation *op = cls;
1831 1831
1832 LOG (GNUNET_ERROR_TYPE_INFO, 1832 LOG (GNUNET_ERROR_TYPE_DEBUG,
1833 "Received request for full set transmission\n"); 1833 "Received request for full set transmission\n");
1834 if (GNUNET_SET_OPERATION_UNION != op->set->operation) 1834 if (GNUNET_SET_OPERATION_UNION != op->set->operation)
1835 { 1835 {
@@ -1910,7 +1910,7 @@ handle_union_p2p_full_done (void *cls,
1910 } 1910 }
1911 break; 1911 break;
1912 default: 1912 default:
1913 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1913 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1914 "Handle full done phase is %u\n", 1914 "Handle full done phase is %u\n",
1915 (unsigned) op->state->phase); 1915 (unsigned) op->state->phase);
1916 GNUNET_break_op (0); 1916 GNUNET_break_op (0);