aboutsummaryrefslogtreecommitdiff
path: root/src/consensus/gnunet-service-consensus.c
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/consensus/gnunet-service-consensus.c
parentab4573d4f7dafe44d414a6d1f23397682ac0ca70 (diff)
downloadgnunet-5086d45a1e477db25f8aa84a53dd3afd32cb0ceb.tar.gz
gnunet-5086d45a1e477db25f8aa84a53dd3afd32cb0ceb.zip
consensus/set: saner log levels
Diffstat (limited to 'src/consensus/gnunet-service-consensus.c')
-rw-r--r--src/consensus/gnunet-service-consensus.c34
1 files changed, 17 insertions, 17 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),