aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuit_st.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-05-21 15:19:30 -0400
committerNick Mathewson <nickm@torproject.org>2019-05-22 11:47:20 -0400
commit482c4972b996fc7b1a3a8cc13f93c8ecc8748590 (patch)
treec7bed5ca5d62a04fbe793ed113a318b55a7e7d0c /src/core/or/circuit_st.h
parent3835a3acf57426f692a787e7729de929b40dc62e (diff)
downloadtor-482c4972b996fc7b1a3a8cc13f93c8ecc8748590.tar.gz
tor-482c4972b996fc7b1a3a8cc13f93c8ecc8748590.zip
sendme: Clarify how sendme_circuit_cell_is_next() works
Commit 4ef8470fa5480d3b was actually reverted before because in the end we needed to do this minus 1 check on the window. This commit clarifies that in the code, takes the useful comment changes from 4ef8470fa5480d3b and makes sendme_circuit_cell_is_next() private since it behaves in a very specific way that one external caller might expect. Part of #30428. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/circuit_st.h')
-rw-r--r--src/core/or/circuit_st.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/or/circuit_st.h b/src/core/or/circuit_st.h
index a68547ecb1..499bf93d6b 100644
--- a/src/core/or/circuit_st.h
+++ b/src/core/or/circuit_st.h
@@ -115,12 +115,11 @@ struct circuit_t {
* list can not contain more than 10 digests of DIGEST_LEN bytes (20).
*
* At position i in the list, the digest corresponds to the
- * ((CIRCWINDOW_INCREMENT * i) - 1)-nth cell received since we expect the
- * (CIRCWINDOW_INCREMENT * i)-nth cell to be the SENDME and thus containing
- * the previous cell digest.
+ * (CIRCWINDOW_INCREMENT * i)-nth cell received since we expect a SENDME to
+ * be received containing that cell digest.
*
- * For example, position 2 (starting at 0) means that we've received 299
- * cells and the 299th cell digest is kept at index 2.
+ * For example, position 2 (starting at 0) means that we've received 300
+ * cells so the 300th cell digest is kept at index 2.
*
* At maximum, this list contains 200 bytes plus the smartlist overhead. */
smartlist_t *sendme_last_digests;