aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_circuit.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2022-06-30 21:46:21 -0400
committerMicah Elizabeth Scott <beth@torproject.org>2023-05-10 07:37:11 -0700
commit5e768d5cb98ef8bae1b76c30610dfe21f17a3fda (patch)
treea9f70bbde87ce56237591553ba5d817c28a1e91d /src/feature/hs/hs_circuit.c
parentd0c2d4cb431e86e7637ad6d917a52ae4ea25b256 (diff)
downloadtor-5e768d5cb98ef8bae1b76c30610dfe21f17a3fda.tar.gz
tor-5e768d5cb98ef8bae1b76c30610dfe21f17a3fda.zip
we were sorting our pqueue the wrong way
i.e. we were putting higher effort intro2 cells at the *end*
Diffstat (limited to 'src/feature/hs/hs_circuit.c')
-rw-r--r--src/feature/hs/hs_circuit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/hs/hs_circuit.c b/src/feature/hs/hs_circuit.c
index 719e19eded..0c71443879 100644
--- a/src/feature/hs/hs_circuit.c
+++ b/src/feature/hs/hs_circuit.c
@@ -616,12 +616,12 @@ cleanup_on_free_client_circ(circuit_t *circ)
}
/** Return less than 0 if a precedes b, 0 if a equals b and greater than 0 if
- * b precedes a. */
+ * b precedes a. Note that *higher* effort is *earlier* in the pqueue. */
static int
compare_rend_request_by_effort_(const void *_a, const void *_b)
{
const pending_rend_t *a = _a, *b = _b;
- if (a->rdv_data.pow_effort < b->rdv_data.pow_effort) {
+ if (a->rdv_data.pow_effort > b->rdv_data.pow_effort) {
return -1;
} else if (a->rdv_data.pow_effort == b->rdv_data.pow_effort) {
return 0;