From d5bcd347cd8d156e3a6d4526fd2470741194a64a Mon Sep 17 00:00:00 2001 From: Bitflash Date: Fri, 31 Jul 2026 17:40:58 -0300 Subject: net: a node could only ever watch 63 peers (#78) --- src/makefile.mingw | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/makefile.mingw') diff --git a/src/makefile.mingw b/src/makefile.mingw index 01f7702..ae533ef 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -14,8 +14,13 @@ WARNFLAGS = -Wformat -Werror=format \ -Wno-deprecated-declarations -Wno-write-strings \ -Wno-narrowing -Wno-unused-result +# FD_SETSIZE has to be defined before winsock2.h and it has to be the same +# number in every translation unit -- fd_set carries an array of that length, +# so disagreeing about it means disagreeing about sizeof(fd_set). That is why +# it lives here as a -D and not as a #define in a header. Windows defaults to +# 64, which capped this node at 63 watchable peers no matter how many it had. CXXFLAGS = -std=gnu++14 -O2 $(WARNFLAGS) -fpermissive -pthread \ - -DWIN32 -DNOPCH \ + -DWIN32 -DNOPCH -DFD_SETSIZE=1024 \ -DSECP256K1_STATIC \ -I$(DEPS)/include -I$(RANDOMX)/src \ -I$(DEPS)/include/nlohmann \ -- cgit v1.2.3