Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
torcontrol.cpp
Go to the documentation of this file.
1// Copyright (c) 2020-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
6#include <test/fuzz/fuzz.h>
7#include <test/fuzz/util.h>
9#include <torcontrol.h>
10
11#include <cstdint>
12#include <string>
13#include <vector>
14
16{
17public:
21
22 bool Connect(const std::string&, const ConnectionCB&, const ConnectionCB&)
23 {
24 return true;
25 }
26
28 {
29 }
30
31 bool Command(const std::string&, const ReplyHandlerCB&)
32 {
33 return true;
34 }
35};
36
38{
39 static const auto testing_setup = MakeNoLogFileContext<>();
40}
41
bool Command(const std::string &, const ReplyHandlerCB &)
bool Connect(const std::string &, const ConnectionCB &, const ConnectionCB &)
Low-level handling for Tor control connection.
Definition torcontrol.h:53
std::function< void(TorControlConnection &, const TorControlReply &) ReplyHandlerCB)
Definition torcontrol.h:56
std::function< void(TorControlConnection &) ConnectionCB)
Definition torcontrol.h:55
Reply from Tor, can be single or multi-line.
Definition torcontrol.h:35
std::vector< std::string > lines
Definition torcontrol.h:40
Controller that connects to Tor control socket, authenticate, then create and maintain an ephemeral o...
Definition torcontrol.h:108
#define FUZZ_TARGET(...)
Definition fuzz.h:35
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
Definition fuzz.h:22
void initialize_torcontrol()
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)
Definition util.h:35
std::vector< std::string > ConsumeRandomLengthStringVector(FuzzedDataProvider &fuzzed_data_provider, const size_t max_vector_size=16, const size_t max_string_length=16) noexcept
Definition util.h:73
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:73
FuzzedDataProvider & fuzzed_data_provider
Definition fees.cpp:38