aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/util.h
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2021-04-23 09:43:43 +0200
committerVasil Dimov <vd@FreeBSD.org>2021-12-01 15:22:08 +0100
commitf8bd13f85ae5404adef23a52719d804a5c36b1e8 (patch)
treeeca0fd0670339d479384bbed2ab6d0bbdd1444b9 /src/test/fuzz/util.h
parente7507f333bc93047d0baadea4fde19f770dacb56 (diff)
downloadbitcoin-f8bd13f85ae5404adef23a52719d804a5c36b1e8.tar.xz
net: add new method Sock::Accept() that wraps accept()
This will help to increase `Sock` usage and make more code mockable.
Diffstat (limited to 'src/test/fuzz/util.h')
-rw-r--r--src/test/fuzz/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h
index 40aaeac63f..fb42dcd0fc 100644
--- a/src/test/fuzz/util.h
+++ b/src/test/fuzz/util.h
@@ -410,6 +410,8 @@ public:
int Connect(const sockaddr*, socklen_t) const override;
+ std::unique_ptr<Sock> Accept(sockaddr* addr, socklen_t* addr_len) const override;
+
int GetSockOpt(int level, int opt_name, void* opt_val, socklen_t* opt_len) const override;
bool Wait(std::chrono::milliseconds timeout, Event requested, Event* occurred = nullptr) const override;