aboutsummaryrefslogtreecommitdiff
path: root/src/core/mainloop/cpuworker.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2022-09-04 03:55:27 -0400
committerMicah Elizabeth Scott <beth@torproject.org>2023-05-10 07:37:11 -0700
commiteba919093320a995a10637170fcc881a4c2c2dd9 (patch)
treed5a419042f28176e9d8d983f65f6d4168186ddc5 /src/core/mainloop/cpuworker.c
parentaa41d4b9396ade02fa1b14a2aa0fa097e11e779d (diff)
downloadtor-eba919093320a995a10637170fcc881a4c2c2dd9.tar.gz
tor-eba919093320a995a10637170fcc881a4c2c2dd9.zip
compute the client-side pow in a cpuworker thread
We mark the intro circuit with a new flag saying that the pow is in the cpuworker queue. When the cpuworker comes back, it either has a solution, in which case we proceed with sending the intro1 cell, or it has no solution, in which case we unmark the intro circuit and let the whole process restart on the next iteration of connection_ap_handshake_attach_circuit().
Diffstat (limited to 'src/core/mainloop/cpuworker.c')
-rw-r--r--src/core/mainloop/cpuworker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/mainloop/cpuworker.c b/src/core/mainloop/cpuworker.c
index 4a22790b44..a42dbb528d 100644
--- a/src/core/mainloop/cpuworker.c
+++ b/src/core/mainloop/cpuworker.c
@@ -14,7 +14,8 @@
* Right now, we use this infrastructure
* <ul><li>for processing onionskins in onion.c
* <li>for compressing consensuses in consdiffmgr.c,
- * <li>and for calculating diffs and compressing them in consdiffmgr.c.
+ * <li>for calculating diffs and compressing them in consdiffmgr.c.
+ * <li>and for solving onion service PoW challenges in pow.c.
* </ul>
**/
#include "core/or/or.h"