1401011f71test: Add test for exceeding max line length in torcontrol (Fabian Jahr)84c1f32071test: Add torcontrol coverage for PoW defense enablement (Fabian Jahr)7dff9ec298test: Add test for partial message handling in torcontrol (Fabian Jahr)569383356etest: Add simple functional test for torcontrol (Fabian Jahr)4117b92e67fuzz: Improve torcontrol fuzz test (Fabian Jahr)b1869e9a2dtorcontrol: Move tor controller into node context (Fabian Jahr)eae193e750torcontrol: Remove libevent usage (Fabian Jahr)8444efbd4arefactor: Get rid of unnecessary newlines in logs (Fabian Jahr)6bcb60354erefactor: Modernize member variable names in torcontrol (Fabian Jahr)a36591d194refactor: 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: https://github.com/bitcoin/bitcoin/issues/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: ACK1401011f71janb84: re ACK1401011f71pinheadmz: ACK1401011f71Tree-SHA512: 167f1d98a634524568cb1d723e7bdb7234bade2c5686586caf2accea58c3308f83a32e0705edc570d6db691ae578a91e474ae4773f126ec2e1619d3adf7df622
src/node/
The src/node/ directory contains code that needs to access node state
(state in CChain, CBlockIndex, CCoinsView, CTxMemPool, and similar
classes).
Code in src/node/ is meant to be segregated from code in
src/wallet/ and src/qt/, to ensure wallet and GUI
code changes don't interfere with node operation, to allow wallet and GUI code
to run in separate processes, and to perhaps eventually allow wallet and GUI
code to be maintained in separate source repositories.
As a rule of thumb, code in one of the src/node/,
src/wallet/, or src/qt/ directories should avoid
calling code in the other directories directly, and only invoke it indirectly
through the more limited src/interfaces/ classes.
This directory is at the moment
sparsely populated. Eventually more substantial files like
src/validation.cpp and
src/txmempool.cpp might be moved there.