18#include <util/threadinterrupt.h>
22 static const auto testing_setup = MakeNoLogFileContext<>();
41 const Proxy sam_proxy{addr,
false};
47 if (session.Listen(conn)) {
48 if (session.Accept(conn)) {
51 }
catch (
const std::runtime_error&) {
58 if (session.Connect(
CService{}, conn, proxy_error)) {
60 conn.
sock->SendComplete(
"verack\n", 10ms, *interrupt);
61 }
catch (
const std::runtime_error&) {
65 fs::remove(private_key_path);
fs::path GetDataDirNet() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get data directory path with appended network identifier.
A combination of a network address (CNetAddr) and a (TCP) port.
Helper to initialize the global NodeClock, let a duration elapse, and reset it after use in a test.
Helper to initialize the global MockableSteadyClock, let a duration elapse, and reset it after use in...
#define COMPAT_IN6ADDR_LOOPBACK_INIT
static constexpr size_t MAX_MSG_SIZE
The maximum size of an incoming message from the I2P SAM proxy (in bytes).
std::function< std::unique_ptr< Sock >(int, int, int)> CreateSock
Socket factory.
An established connection with another peer.
std::unique_ptr< Sock > sock
Connected socket.
SeedRandomStateForTest(SeedRand::ZEROS)
FUZZ_TARGET(i2p,.init=initialize_i2p)
std::shared_ptr< CThreadInterrupt > ConsumeThreadInterrupt(FuzzedDataProvider &fuzzed_data_provider)
NodeSeconds ConsumeTime(FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &max) noexcept
@ ZEROS
Seed with a compile time constant of zeros.
FuzzedDataProvider & fuzzed_data_provider