19 static const auto testing_setup = MakeNoLogFileContext<>();
30 CreateSock = [&fuzzed_data_provider](int, int, int) {
31 return std::make_unique<FuzzedSock>(fuzzed_data_provider);
35 const CService addr{in6_addr(IN6ADDR_LOOPBACK_INIT), 7656};
36 const Proxy sam_proxy{addr,
false};
42 if (session.Listen(conn)) {
43 if (session.Accept(conn)) {
46 }
catch (
const std::runtime_error&) {
53 if (session.Connect(
CService{}, conn, proxy_error)) {
55 conn.
sock->SendComplete(
"verack\n", 10ms, interrupt);
56 }
catch (
const std::runtime_error&) {
60 fs::remove_all(private_key_path);
An established connection with another peer.
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.
fs::path GetDataDirNet() const
Get data directory path with appended network identifier.
FUZZ_TARGET(i2p,.init=initialize_i2p)
A combination of a network address (CNetAddr) and a (TCP) port.
A helper class for interruptible sleeps.
static constexpr size_t MAX_MSG_SIZE
The maximum size of an incoming message from the I2P SAM proxy (in bytes).
int64_t ConsumeTime(FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &max) noexcept
std::function< std::unique_ptr< Sock >int, int, int)> CreateSock
Socket factory.
std::unique_ptr< Sock > sock
Connected socket.
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...