[tor-commits] [tor/master] histogram_edges is histogram_len long

nickm at torproject.org nickm at torproject.org
Wed Mar 13 13:37:52 UTC 2019


commit 341cd6ea6631217a5487198a773b56a057afd5f9
Author: George Kadianakis <desnacked at riseup.net>
Date:   Mon Feb 25 13:28:35 2019 +0200

    histogram_edges is histogram_len long
---
 src/core/or/circuitpadding.c   | 1 -
 src/core/or/circuitpadding.h   | 2 +-
 src/test/test_circuitpadding.c | 2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/core/or/circuitpadding.c b/src/core/or/circuitpadding.c
index ceb9181f9..09dda6da3 100644
--- a/src/core/or/circuitpadding.c
+++ b/src/core/or/circuitpadding.c
@@ -2185,7 +2185,6 @@ circpad_circ_responder_machine_init(void)
   circ_responder_machine->states[CIRCPAD_STATE_GAP].histogram_edges[3]= 4000;
   circ_responder_machine->states[CIRCPAD_STATE_GAP].histogram_edges[4]= 8000;
   circ_responder_machine->states[CIRCPAD_STATE_GAP].histogram_edges[5]= 16000;
-  circ_responder_machine->states[CIRCPAD_STATE_GAP].histogram_edges[6]=1000000;
   /* Specify histogram tokens */
   circ_responder_machine->states[CIRCPAD_STATE_GAP].histogram[0] = 0;
   circ_responder_machine->states[CIRCPAD_STATE_GAP].histogram[1] = 1;
diff --git a/src/core/or/circuitpadding.h b/src/core/or/circuitpadding.h
index b9e903b9f..d11358a15 100644
--- a/src/core/or/circuitpadding.h
+++ b/src/core/or/circuitpadding.h
@@ -290,7 +290,7 @@ typedef struct circpad_state_t {
    * bin. The rightmost edge is always infinity and is not specified in this
    * array.
    *
-   * This array must have histogram_len+1 elements. */
+   * This array must have histogram_len elements. */
   circpad_delay_t histogram_edges[CIRCPAD_MAX_HISTOGRAM_LEN+1];
   /** Total number of tokens in this histogram. This is a constant and is *not*
    *  decremented every time we spend a token. It's used for initializing and
diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c
index 65bf529e4..599b7fb24 100644
--- a/src/test/test_circuitpadding.c
+++ b/src/test/test_circuitpadding.c
@@ -425,8 +425,6 @@ helper_create_basic_machine(void)
   circ_client_machine.states[CIRCPAD_STATE_BURST].histogram_edges[2] = 5000;
   circ_client_machine.states[CIRCPAD_STATE_BURST].histogram_edges[3] = 10000;
   circ_client_machine.states[CIRCPAD_STATE_BURST].histogram_edges[4] = 20000;
-  circ_client_machine.states[CIRCPAD_STATE_BURST].histogram_edges[5] = 400000;
-  circ_client_machine.states[CIRCPAD_STATE_BURST].histogram_edges[6] = 1000000;
 
   circ_client_machine.states[CIRCPAD_STATE_BURST].histogram[0] = 1;
   circ_client_machine.states[CIRCPAD_STATE_BURST].histogram[1] = 0;





More information about the tor-commits mailing list