Review report

bitcoin/bitcoin: PR #36759

1 suggestion

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Default no-Tor logging policy lacks regression coverage

The new test exercises only explicitly configured Tor, leaving the default path's one-time info message and debug-only retries unprotected against regression.

Location: test/functional/feature_torcontrol.py:297 (head).

Details and suggested fix

test_connect_failure_warning sets both -torcontrol and -listenonion=1, selecting manual_connection=true. The functional framework also writes listenonion=0 into bitcoin.conf, so exercising the automatic path requires changing that configuration and would target the fixed default port, where local Tor might be listening. No unit or fuzz test calls TorControlConnection::Connect. Add a unit test in torcontrol_tests.cpp using BasicTestingSetup, which enables debug logging. Construct one connection and override CreateSock to return null, saving and restoring the hook as the I2P tests do. Call Connect(DEFAULT_TOR_CONTROL, /*manual_connection=*/false) twice. Use DebugLogHelper match callbacks to assert one Not using Tor info message, a TOR debug message on the second failure, and no warnings. This covers the PR's main logging change deterministically while retaining the explicit-configuration test.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.