Added miniupnp submodule

pull/243/head
SChernykh 1 year ago
parent c2d8c806d2
commit a84a0bd8dc

3
.gitmodules vendored

@ -22,3 +22,6 @@
[submodule "external/src/curl"]
path = external/src/curl
url = https://github.com/SChernykh/curl
[submodule "external/src/miniupnp"]
path = external/src/miniupnp
url = https://github.com/SChernykh/miniupnp

@ -5,6 +5,7 @@ option(STATIC_BINARY "Build static binary" OFF)
option(STATIC_LIBS "Link libuv and libzmq statically" OFF)
option(WITH_RANDOMX "Include the RandomX library in the build. If this is turned off, p2pool will rely on monerod for verifying RandomX hashes" ON)
option(WITH_LTO "Use link-time compiler optimization (if linking fails for you, run cmake with -DWITH_LTO=OFF)" ON)
option(WITH_UPNP "Include UPnP support. If this is turned off, p2pool will not be able to configure port forwarding on UPnP-enabled routers." ON)
option(DEV_TEST_SYNC "[Developer only] Sync test, stop p2pool after sync is complete" OFF)
@ -17,7 +18,13 @@ endif()
if (WITH_RANDOMX)
add_definitions(-DWITH_RANDOMX)
add_subdirectory(external/src/RandomX)
set(LIBS randomx)
set(LIBS ${LIBS} randomx)
endif()
if (WITH_UPNP)
add_definitions(-DWITH_UPNP)
add_subdirectory(external/src/miniupnp/miniupnpc)
set(LIBS ${LIBS} libminiupnpc-static)
endif()
if (DEV_TEST_SYNC)
@ -117,6 +124,9 @@ if (WITH_RANDOMX)
endif()
include_directories(external/src/rapidjson/include)
include_directories(external/src/robin-hood-hashing/src/include)
if (WITH_UPNP)
include_directories(external/src/miniupnp/miniupnpc/include)
endif()
if (WIN32)
set(LIBS ${LIBS} ws2_32 iphlpapi userenv psapi)

@ -0,0 +1 @@
Subproject commit b61674aa510a86ece3b5b41ec9d932f5b2bac5ad

@ -84,6 +84,7 @@ TEST(pool_block, deserialize)
ASSERT_EQ(b.m_broadcasted, false);
ASSERT_EQ(b.m_wantBroadcast, false);
#if !(defined(__FreeBSD__) || defined(__OpenBSD__))
RandomX_Hasher hasher(nullptr);
hash seed;
@ -103,6 +104,7 @@ TEST(pool_block, deserialize)
ASSERT_EQ(s.str(), "aa7a3c4a2d67cb6a728e244288219bf038024f3b511b0da197a19ec601000000");
ASSERT_EQ(b.m_difficulty.check_pow(pow_hash), true);
#endif
destroy_crypto_cache();
}

Loading…
Cancel
Save