diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-06-15 21:05:27 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2021-03-02 12:21:32 +0000 |
commit | 10d4477dae663631411a1bd5a92e4fa941d3a96c (patch) | |
tree | f80c5ea181c79d4c7215316a170511936f390550 /src/torcontrol.h | |
parent | 64219c01dcb0aec6ca26170c94223bd7a29dad19 (diff) | |
download | bitcoin-10d4477dae663631411a1bd5a92e4fa941d3a96c.tar.xz |
tests: Add fuzzing harness for TorController
Diffstat (limited to 'src/torcontrol.h')
-rw-r--r-- | src/torcontrol.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/torcontrol.h b/src/torcontrol.h index ecf26d89c1..7258f27cb6 100644 --- a/src/torcontrol.h +++ b/src/torcontrol.h @@ -113,6 +113,9 @@ class TorController { public: TorController(struct event_base* base, const std::string& tor_control_center, const CService& target); + TorController() : conn{nullptr} { + // Used for testing only. + } ~TorController(); /** Get name of file to store private key in */ @@ -127,7 +130,7 @@ private: std::string private_key; std::string service_id; bool reconnect; - struct event *reconnect_ev; + struct event *reconnect_ev = nullptr; float reconnect_timeout; CService service; const CService m_target; @@ -136,6 +139,7 @@ private: /** ClientNonce for SAFECOOKIE auth */ std::vector<uint8_t> clientNonce; +public: /** Callback for ADD_ONION result */ void add_onion_cb(TorControlConnection& conn, const TorControlReply& reply); /** Callback for AUTHENTICATE result */ |