]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
dirvote: Improve the posted vote log message
authorteor <teor@torproject.org>
Wed, 19 Feb 2020 01:15:20 +0000 (11:15 +1000)
committerNick Mathewson <nickm@torproject.org>
Thu, 20 Feb 2020 13:17:37 +0000 (08:17 -0500)
Cleanup after 4631.

src/feature/dirauth/dirvote.c
src/test/test_dir_handle_get.c

index 66bb8fe918b28534e9afd8f567220178ce544c51..90e82a4ee8e547632e862b658ec249406f44d15b 100644 (file)
@@ -3223,9 +3223,11 @@ dirvote_add_vote(const char *vote_body, time_t time_posted,
     char tbuf1[ISO_TIME_LEN+1], tbuf2[ISO_TIME_LEN+1];
     format_iso_time(tbuf1, time_posted);
     format_iso_time(tbuf2, voting_schedule.fetch_missing_votes);
-    log_warn(LD_DIR, "Rejecting vote from %s received at %s; "
-             "our cutoff for received votes is %s", vi->address, tbuf1, tbuf2);
-    *msg_out = "Vote received too late, would be dangerous to count it";
+    log_warn(LD_DIR, "Rejecting posted vote from %s received at %s; "
+             "our cutoff for received votes is %s. Check your clock, "
+             "CPU load, and network load. Also check the authority that "
+             "posted the vote.", vi->address, tbuf1, tbuf2);
+    *msg_out = "Posted vote received too late, would be dangerous to count it";
     goto err;
   }
 
index c0af71147d025e182fae87d3fee9381fb906e9c6..cf310ebfe0674acb619406d56bd83759d8178e3b 100644 (file)
@@ -2750,7 +2750,7 @@ test_dir_handle_get_status_vote_too_late(void* data)
   tt_assert(!vote);
   tt_int_op(status_out, OP_EQ, 400);
   tt_str_op(msg_out, OP_EQ,
-            "Vote received too late, would be dangerous to count it");
+            "Posted vote received too late, would be dangerous to count it");
 
   /* Just after fetch missing */
   vote = dirvote_add_vote(VOTE_BODY_V3,
@@ -2759,7 +2759,7 @@ test_dir_handle_get_status_vote_too_late(void* data)
   tt_assert(!vote);
   tt_int_op(status_out, OP_EQ, 400);
   tt_str_op(msg_out, OP_EQ,
-            "Vote received too late, would be dangerous to count it");
+            "Posted vote received too late, would be dangerous to count it");
 
   /* On fetch missing */
   vote = dirvote_add_vote(VOTE_BODY_V3,