Commit 80572c7
committed
Merge bitcoin/bitcoin#34158: torcontrol: Remove libevent usage
1401011 test: Add test for exceeding max line length in torcontrol (Fabian Jahr)
84c1f32 test: Add torcontrol coverage for PoW defense enablement (Fabian Jahr)
7dff9ec test: Add test for partial message handling in torcontrol (Fabian Jahr)
5693833 test: Add simple functional test for torcontrol (Fabian Jahr)
4117b92 fuzz: Improve torcontrol fuzz test (Fabian Jahr)
b1869e9 torcontrol: Move tor controller into node context (Fabian Jahr)
eae193e torcontrol: Remove libevent usage (Fabian Jahr)
8444efb refactor: Get rid of unnecessary newlines in logs (Fabian Jahr)
6bcb603 refactor: Modernize member variable names in torcontrol (Fabian Jahr)
a36591d refactor: Use constexpr in torcontrol where possible (Fabian Jahr)
Pull request description:
This is part of the effort to remove the libevent dependency from our code base: bitcoin/bitcoin#31194
The current approach tries to reuse existing code and follows roughly similar design decisions. It replaces the libevent-based async I/O with blocking I/O utilizing the existing `Sock` and `CThreadInterrupt`. The controller runs in a dedicated thread.
There are some optional code modernizations thrown in made along the way (namings, constexpr etc.). These are not strictly necessary but make the end result with the new code more consistent.
ACKs for top commit:
achow101:
ACK 1401011
janb84:
re ACK 1401011
pinheadmz:
ACK 1401011
Tree-SHA512: 167f1d98a634524568cb1d723e7bdb7234bade2c5686586caf2accea58c3308f83a32e0705edc570d6db691ae578a91e474ae4773f126ec2e1619d3adf7df622File tree
8 files changed
+552
-314
lines changed- src
- node
- test/fuzz
- test/functional
8 files changed
+552
-314
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| |||
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
322 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
| |||
2187 | 2192 | | |
2188 | 2193 | | |
2189 | 2194 | | |
2190 | | - | |
| 2195 | + | |
2191 | 2196 | | |
2192 | 2197 | | |
2193 | 2198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 15 | | |
38 | 16 | | |
39 | 17 | | |
| |||
44 | 22 | | |
45 | 23 | | |
46 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
47 | 28 | | |
48 | 29 | | |
49 | 30 | | |
| |||
61 | 42 | | |
62 | 43 | | |
63 | 44 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 45 | + | |
68 | 46 | | |
69 | 47 | | |
70 | 48 | | |
71 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
72 | 53 | | |
73 | 54 | | |
74 | | - | |
| 55 | + | |
75 | 56 | | |
76 | 57 | | |
77 | | - | |
| 58 | + | |
78 | 59 | | |
79 | 60 | | |
80 | | - | |
| 61 | + | |
81 | 62 | | |
82 | 63 | | |
83 | | - | |
| 64 | + | |
84 | 65 | | |
85 | 66 | | |
86 | 67 | | |
0 commit comments