From 082a90914d137e4471f0359d42d7ce91639bf5a0 Mon Sep 17 00:00:00 2001 From: DCG-Claude Date: Sun, 15 Nov 2026 18:12:41 -0600 Subject: [PATCH 1/4] Merge bitcoin/bitcoin#29994: doc: removed help text saying that peers may not connect automatically 95897ff181c0757e445f0e066a2a590a0a0120d2 doc: removed help text saying that peers may not connect automatically (kevkevin) Pull request description: Introduced in https://github.com/bitcoin/bitcoin/pull/23542 and released in version 23.0 there has been significant time since this change (2 years). This should be removed as it is no longer relevant ACKs for top commit: stickies-v: ACK 95897ff181c0757e445f0e066a2a590a0a0120d2 tdb3: ACK for 95897ff181c0757e445f0e066a2a590a0a0120d2. vasild: ACK 95897ff181c0757e445f0e066a2a590a0a0120d2 jonatack: ACK 95897ff181c0757e445f0e066a2a590a0a0120d2 kristapsk: ACK 95897ff181c0757e445f0e066a2a590a0a0120d2. According to https://bitnodes.io/dashboard/#user-agents stats, most nodes on the network are v23+. Tree-SHA512: 9e35194f8a1e06f1447450af2ea30cdc43722665c2d2e4b7aa9a52afac5c1e83fed744742c836743a555cc180c90f9eebdc6637eba6190010d693eef9c5834f7 Dash adaptations: - src/init.cpp: -port help text lists Dash's devnet default port instead of signet, as the existing Dash line already did --- src/init.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index dc2a1cb95296..1c8232dc4287 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -706,9 +706,7 @@ void SetupServerArgs(ArgsManager& argsman) argsman.AddArg("-peerbloomfilters", strprintf("Support filtering of blocks and transaction with bloom filters (default: %u)", DEFAULT_PEERBLOOMFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); argsman.AddArg("-txreconciliation", strprintf("Enable transaction reconciliations per BIP 330 (default: %d)", DEFAULT_TXRECONCILIATION_ENABLE), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CONNECTION); argsman.AddArg("-peertimeout=", strprintf("Specify a p2p connection timeout delay in seconds. After connecting to a peer, wait this amount of time before considering disconnection based on inactivity (minimum: 1, default: %d)", DEFAULT_PEER_CONNECT_TIMEOUT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); - // TODO: remove the sentence "Nodes not using ... incoming connections." once the changes from - // https://github.com/bitcoin/bitcoin/pull/23542 have become widespread. - argsman.AddArg("-port=", strprintf("Listen for connections on . Nodes not using the default ports (default: %u, testnet: %u, devnet: %u, regtest: %u) are unlikely to get incoming connections. Not relevant for I2P (see doc/i2p.md).", defaultChainParams->GetDefaultPort(), testnetChainParams->GetDefaultPort(), devnetChainParams->GetDefaultPort(), regtestChainParams->GetDefaultPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION); + argsman.AddArg("-port=", strprintf("Listen for connections on (default: %u, testnet: %u, devnet: %u, regtest: %u). Not relevant for I2P (see doc/i2p.md).", defaultChainParams->GetDefaultPort(), testnetChainParams->GetDefaultPort(), devnetChainParams->GetDefaultPort(), regtestChainParams->GetDefaultPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION); #if HAVE_SOCKADDR_UN argsman.AddArg("-proxy=", "Connect through SOCKS5 proxy, set -noproxy to disable (default: disabled). May be a local file path prefixed with 'unix:' if the proxy supports it.", ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_ELISION, OptionsCategory::CONNECTION); #else From 7ab30e73b8d04d2d3cbb7bece45b26ca94e6afa5 Mon Sep 17 00:00:00 2001 From: DCG-Claude Date: Sun, 15 Nov 2026 18:13:04 -0600 Subject: [PATCH 2/4] Merge bitcoin/bitcoin#29120: test: Add test case for spending bare multisig e504b1fa1fa4d014b329dea81bfdf1aa55db238f test: Add test case for spending bare multisig (Brandon Odiwuor) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/29113 ACKs for top commit: ajtowns: ACK e504b1fa1fa4d014b329dea81bfdf1aa55db238f ; LGTM and just checking the 1-of-3 case seems fine maflcko: utACK e504b1fa1fa4d014b329dea81bfdf1aa55db238f achow101: ACK e504b1fa1fa4d014b329dea81bfdf1aa55db238f willcl-ark: reACK e504b1fa1fa4d014b329dea81bfdf1aa55db238f Tree-SHA512: 641a12599efa34e1a3eb65b125318df326628fef3e6886410ea9e63a044664fad7bcad46d1d6f41ddc59630746b9963cedb569c2682b5940b32b9225883da8f2 Dash adaptations: - src/init.cpp: only the -permitbaremultisig help text changes; Dash registers -mempoolfullrbf elsewhere in SetupServerArgs, so the upstream neighbouring line is not duplicated - test/functional/mempool_accept.py: signs with sign_input, the name Dash's backport of bitcoin#28025 gave upstream's sign_input_legacy - test/functional/mempool_accept.py: spend output uses script_to_p2sh_script instead of script_to_p2wsh_script (Dash has no segwit) --- src/init.cpp | 2 +- test/functional/mempool_accept.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 1c8232dc4287..fb43a38c18ee 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -868,7 +868,7 @@ void SetupServerArgs(ArgsManager& argsman) "is of this size or less (default: %u)", MAX_OP_RETURN_RELAY), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); - argsman.AddArg("-permitbaremultisig", strprintf("Relay non-P2SH multisig (default: %u)", DEFAULT_PERMIT_BAREMULTISIG), ArgsManager::ALLOW_ANY, + argsman.AddArg("-permitbaremultisig", strprintf("Relay transactions creating non-P2SH multisig outputs (default: %u)", DEFAULT_PERMIT_BAREMULTISIG), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); argsman.AddArg("-minrelaytxfee=", strprintf("Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)", CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE)), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py index 1fe8488f73ef..b93a018bf3bf 100755 --- a/test/functional/mempool_accept.py +++ b/test/functional/mempool_accept.py @@ -27,6 +27,8 @@ OP_HASH160, OP_RETURN, OP_TRUE, + SIGHASH_ALL, + sign_input, ) from test_framework.script_util import ( keys_to_multisig_script, @@ -388,5 +390,24 @@ def run_test(self): maxfeerate=0, ) + self.log.info('Spending a confirmed bare multisig is okay') + address = self.wallet.get_address() + tx = tx_from_hex(raw_tx_reference) + privkey, pubkey = generate_keypair() + tx.vout[0].scriptPubKey = keys_to_multisig_script([pubkey] * 3, k=1) # Some bare multisig script (1-of-3) + tx.rehash() + self.generateblock(node, address, [tx.serialize().hex()]) + tx_spend = CTransaction() + tx_spend.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) + tx_spend.vout.append(CTxOut(tx.vout[0].nValue - int(fee*COIN), script_to_p2sh_script(CScript([OP_TRUE])))) + tx_spend.rehash() + sign_input(tx_spend, 0, tx.vout[0].scriptPubKey, privkey, sighash_type=SIGHASH_ALL) + tx_spend.vin[0].scriptSig = bytes(CScript([OP_0])) + tx_spend.vin[0].scriptSig + self.check_mempool_result( + result_expected=[{'txid': tx_spend.rehash(), 'allowed': True, 'vsize': tx_spend.get_vsize(), 'fees': { 'base': Decimal('0.00000700')}}], + rawtxs=[tx_spend.serialize().hex()], + maxfeerate=0, + ) + if __name__ == '__main__': MempoolAcceptanceTest().main() From 9cf2af2c201df5034fad84327a536842254b487c Mon Sep 17 00:00:00 2001 From: DCG-Claude Date: Sun, 15 Nov 2026 18:13:35 -0600 Subject: [PATCH 3/4] Merge bitcoin/bitcoin#30519: ci: add `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` to TSAN (libc++) job e3edaccd9deb2da50be70d2d8768eca8821785c7 ci: add _LIBCPP_REMOVE_TRANSITIVE_INCLUDES to TSAN job (fanquake) 6e786165ca08013fe3cfb2641241133563a3f051 refactor: fix missing includes (fanquake) Pull request description: Add `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` to one of the libc++ CI jobs, to catch missing includes, that are otherwise hidden by transitive includes inside libc++. A more appropriate place for this might be the tidy job, but that does not use libc++. See https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html for more information. ACKs for top commit: maflcko: re-ACK e3edaccd9deb2da50be70d2d8768eca8821785c7 Tree-SHA512: 3fb2e9bbbf4bb1570633d52939875ee674d934b645a4037a309643f84ab69edf0fb5b6cfcbd02fa7d92052a64fa63f31979a58fede23593c4df7c33a8cb2953a Dash adaptations: - ci/test/00_setup_env_native_tsan.sh: -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES added to Dash's separate CPPFLAGS export (Dash keeps CPPFLAGS out of BITCOIN_CONFIG) - src/init.h: keeps Dash's #include (Dash's replacement for , which bitcoind.cpp relies on for CoreContext); drops / like upstream --- ci/test/00_setup_env_native_tsan.sh | 2 +- src/crypto/sha256.cpp | 5 +++-- src/init.h | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/test/00_setup_env_native_tsan.sh b/ci/test/00_setup_env_native_tsan.sh index f138845f492d..efb398f112fe 100755 --- a/ci/test/00_setup_env_native_tsan.sh +++ b/ci/test/00_setup_env_native_tsan.sh @@ -33,5 +33,5 @@ export TEST_RUNNER_EXTRA="--extended --exclude feature_pruning,feature_dbcrash,w export TEST_RUNNER_EXTRA="${TEST_RUNNER_EXTRA} --timeout-factor=4" # Increase timeout because sanitizers slow down export GOAL="install" export BITCOIN_CONFIG="--enable-zmq --without-zstd --with-sanitizers=thread CC=clang-19 CXX=clang++-19" -export CPPFLAGS="-DARENA_DEBUG" +export CPPFLAGS="-DARENA_DEBUG -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES" export PYZMQ=true diff --git a/src/crypto/sha256.cpp b/src/crypto/sha256.cpp index 9e6405a1f142..ce6449b65a40 100644 --- a/src/crypto/sha256.cpp +++ b/src/crypto/sha256.cpp @@ -9,8 +9,9 @@ #include #include -#include -#include +#include +#include +#include #if !defined(DISABLE_OPTIMIZED_SHA256) #include diff --git a/src/init.h b/src/init.h index b0c6feb26031..6c4113cea5d2 100644 --- a/src/init.h +++ b/src/init.h @@ -9,8 +9,6 @@ #include #include -#include -#include //! Default value for -daemon option static constexpr bool DEFAULT_DAEMON = false; From 0c238509b38267e82ad8e961be672b9d4b056246 Mon Sep 17 00:00:00 2001 From: DCG-Claude Date: Sun, 15 Nov 2026 18:14:15 -0600 Subject: [PATCH 4/4] Merge bitcoin/bitcoin#29876: build: add `-Wundef` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit e3dc64f4990a15df3fd6147831f66fc2a31c71ad build: add -Wundef (fanquake) 82b43955f7948b225bebd08851a616d17f70a926 refactor: use #ifdef HAVE_SOCKADDR_UN (fanquake) 40cd7585a042938937b5964c9c264e2bf4a80742 randomenv: use ifdef over if (fanquake) 7839503b309c107e8229475a8fbf66601b0e7e8e zmq: use #ifdef ENABLE_ZMQ (fanquake) 79e197b17536b52647599ad9b3f09d2556f14385 build: Suppress warnings from boost and capnproto in multiprocess code (Ryan Ofsky) Pull request description: Turn on `-Wundef`. [> Warn if an undefined identifier is evaluated in an #if directive. Such identifiers are replaced with zero.](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wundef). Note that this is still beneficial with CMake, and may even be nice to have enabled prior, to catch any change in behaviour. If we end up with this enabled, it should probably be enough to fix #16419. ACKs for top commit: hebasto: ACK e3dc64f4990a15df3fd6147831f66fc2a31c71ad, I have reviewed the code and it looks OK. Tree-SHA512: 73436ead07f3a09ba0d30f7105df50d9b2ec8452f11e866bc1c7ebc10c005772ee77fedaa125f444175663c04dfc472f98c2699c63711da356089b66a8cc3e0a Dash adaptations: - src/init.cpp: #if→#ifdef on ENABLE_ZMQ/HAVE_SOCKADDR_UN guards applied around Dash-only code (devnet -port help, wallet CoinJoin/evo/governance/masternode RPC registration, Dash zmq args) - src/netbase.cpp: #if HAVE_SOCKADDR_UN→#ifdef applied to Dash's CreateSockOS(sa_family_t), including its extra AF_UNIX protocol guard - src/rpc/mining.cpp, src/rpc/client.cpp, src/test/rpc_tests.cpp: Dash-only `#if ENABLE_MINER` changed to `#ifdef`, as --disable-miner (Dash's win64/macOS CI) leaves it undefined under -Wundef --- configure.ac | 4 ++++ src/Makefile.am | 2 +- src/crypto/x11/sph_types.h | 35 ++++++++++++++++++++++++++++++++--- src/init.cpp | 16 ++++++++-------- src/netbase.cpp | 10 +++++----- src/randomenv.cpp | 14 +++++++------- src/rpc/client.cpp | 2 +- src/rpc/mining.cpp | 2 +- src/test/rpc_tests.cpp | 2 +- 9 files changed, 60 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index 814b70ffdeea..c27e59ad5376 100644 --- a/configure.ac +++ b/configure.ac @@ -525,6 +525,7 @@ AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [WARN_CXXFLAGS="$WARN_CXXFLAGS - AX_CHECK_COMPILE_FLAG([-Wunreachable-code], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code"], [], [$CXXFLAG_WERROR]) AX_CHECK_COMPILE_FLAG([-Wdocumentation], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"], [], [$CXXFLAG_WERROR]) AX_CHECK_COMPILE_FLAG([-Wself-assign], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wself-assign"], [], [$CXXFLAG_WERROR]) +AX_CHECK_COMPILE_FLAG([-Wundef], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wundef"], [], [$CXXFLAG_WERROR]) dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all dnl unknown options if any other warning is produced. Test the -Wfoo case, and @@ -1720,6 +1721,9 @@ if test "$with_libmultiprocess" = "yes" || test "$with_libmultiprocess" = "auto" PKG_CHECK_MODULES([LIBMULTIPROCESS], [libmultiprocess], [ libmultiprocess_found=yes; libmultiprocess_prefix=`$PKG_CONFIG --variable=prefix libmultiprocess`; + if test "$suppress_external_warnings" != "no" ; then + LIBMULTIPROCESS_CFLAGS=SUPPRESS_WARNINGS($LIBMULTIPROCESS_CFLAGS) + fi ], [true]) elif test "$with_libmultiprocess" != "no"; then AC_MSG_ERROR([--with-libmultiprocess=$with_libmultiprocess value is not yes, auto, or no]) diff --git a/src/Makefile.am b/src/Makefile.am index 7069ea92ed85..bcddb95fca27 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1530,7 +1530,7 @@ libbitcoin_ipc_a_SOURCES = \ ipc/process.cpp \ ipc/process.h \ ipc/protocol.h -libbitcoin_ipc_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) +libbitcoin_ipc_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) libbitcoin_ipc_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(LIBMULTIPROCESS_CFLAGS) include $(MPGEN_PREFIX)/include/mpgen.mk diff --git a/src/crypto/x11/sph_types.h b/src/crypto/x11/sph_types.h index 6f3b8db480c6..da17d960062e 100644 --- a/src/crypto/x11/sph_types.h +++ b/src/crypto/x11/sph_types.h @@ -101,7 +101,7 @@ typedef int_fast64_t sph_s64; * Define SPH_INLINE to be an "inline" qualifier, if available. We define * some small macro-like functions which benefit greatly from being inlined. */ -#if (defined __STDC__ && __STDC_VERSION__ >= 199901L) || defined __GNUC__ +#if (defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || defined __GNUC__ #define SPH_INLINE inline #elif defined _MSC_VER #define SPH_INLINE __inline @@ -214,14 +214,14 @@ typedef int_fast64_t sph_s64; /* * MIPS, little-endian. */ -#elif MIPSEL || _MIPSEL || __MIPSEL || __MIPSEL__ +#elif defined MIPSEL || defined _MIPSEL || defined __MIPSEL || defined __MIPSEL__ #define SPH_DETECT_LITTLE_ENDIAN 1 /* * MIPS, big-endian. */ -#elif MIPSEB || _MIPSEB || __MIPSEB || __MIPSEB__ +#elif defined MIPSEB || defined _MIPSEB || defined __MIPSEB || defined __MIPSEB__ #define SPH_DETECT_BIG_ENDIAN 1 @@ -316,6 +316,35 @@ typedef int_fast64_t sph_s64; #define SPH_PPC64_GCC SPH_DETECT_PPC64_GCC #endif +/* + * Give the remaining feature macros an explicit value of 0 so they can be + * tested with #if under -Wundef. + */ +#ifndef SPH_UNALIGNED +#define SPH_UNALIGNED 0 +#endif +#ifndef SPH_LITTLE_ENDIAN +#define SPH_LITTLE_ENDIAN 0 +#endif +#ifndef SPH_BIG_ENDIAN +#define SPH_BIG_ENDIAN 0 +#endif +#ifndef SPH_I386_GCC +#define SPH_I386_GCC 0 +#endif +#ifndef SPH_AMD64_GCC +#define SPH_AMD64_GCC 0 +#endif +#ifndef SPH_SPARCV9_GCC +#define SPH_SPARCV9_GCC 0 +#endif +#ifndef SPH_SPARCV9_GCC_64 +#define SPH_SPARCV9_GCC_64 0 +#endif +#ifndef SPH_NO_ASM +#define SPH_NO_ASM 0 +#endif + #if SPH_LITTLE_ENDIAN && !defined SPH_LITTLE_FAST #define SPH_LITTLE_FAST 1 #endif diff --git a/src/init.cpp b/src/init.cpp index fb43a38c18ee..62c256026349 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -165,7 +165,7 @@ #include -#if ENABLE_ZMQ +#ifdef ENABLE_ZMQ #include #include #include @@ -489,7 +489,7 @@ void PrepareShutdown(NodeContext& node) client->stop(); } -#if ENABLE_ZMQ +#ifdef ENABLE_ZMQ if (g_zmq_notification_interface) { UnregisterValidationInterface(g_zmq_notification_interface.get()); g_zmq_notification_interface.reset(); @@ -693,7 +693,7 @@ void SetupServerArgs(ArgsManager& argsman) argsman.AddArg("-maxsendbuffer=", strprintf("Maximum per-connection memory usage for the send buffer, *1000 bytes (default: %u)", DEFAULT_MAXSENDBUFFER), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); argsman.AddArg("-maxtimeadjustment", strprintf("Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by outbound peers forward or backward by this amount (default: %u seconds).", DEFAULT_MAX_TIME_ADJUSTMENT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); argsman.AddArg("-maxuploadtarget=", strprintf("Tries to keep outbound traffic under the given target per 24h. Limit does not apply to peers with 'download' permission or blocks created within past week. 0 = no limit (default: %s). Optional suffix units [k|K|m|M|g|G|t|T] (default: M). Lowercase is 1000 base while uppercase is 1024 base", DEFAULT_MAX_UPLOAD_TARGET), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); -#if HAVE_SOCKADDR_UN +#ifdef HAVE_SOCKADDR_UN argsman.AddArg("-onion=", "Use separate SOCKS5 proxy to reach peers via Tor onion services, set -noonion to disable (default: -proxy). May be a local file path prefixed with 'unix:'.", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); #else argsman.AddArg("-onion=", "Use separate SOCKS5 proxy to reach peers via Tor onion services, set -noonion to disable (default: -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); @@ -707,7 +707,7 @@ void SetupServerArgs(ArgsManager& argsman) argsman.AddArg("-txreconciliation", strprintf("Enable transaction reconciliations per BIP 330 (default: %d)", DEFAULT_TXRECONCILIATION_ENABLE), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CONNECTION); argsman.AddArg("-peertimeout=", strprintf("Specify a p2p connection timeout delay in seconds. After connecting to a peer, wait this amount of time before considering disconnection based on inactivity (minimum: 1, default: %d)", DEFAULT_PEER_CONNECT_TIMEOUT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); argsman.AddArg("-port=", strprintf("Listen for connections on (default: %u, testnet: %u, devnet: %u, regtest: %u). Not relevant for I2P (see doc/i2p.md).", defaultChainParams->GetDefaultPort(), testnetChainParams->GetDefaultPort(), devnetChainParams->GetDefaultPort(), regtestChainParams->GetDefaultPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION); -#if HAVE_SOCKADDR_UN +#ifdef HAVE_SOCKADDR_UN argsman.AddArg("-proxy=", "Connect through SOCKS5 proxy, set -noproxy to disable (default: disabled). May be a local file path prefixed with 'unix:' if the proxy supports it.", ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_ELISION, OptionsCategory::CONNECTION); #else argsman.AddArg("-proxy=", "Connect through SOCKS5 proxy, set -noproxy to disable (default: disabled)", ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_ELISION, OptionsCategory::CONNECTION); @@ -741,7 +741,7 @@ void SetupServerArgs(ArgsManager& argsman) g_wallet_init_interface.AddWalletOptions(argsman); -#if ENABLE_ZMQ +#ifdef ENABLE_ZMQ argsman.AddArg("-zmqpubhashblock=
", "Enable publish hash block in
", ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ); argsman.AddArg("-zmqpubhashchainlock=
", "Enable publish hash block (locked via ChainLocks) in
", ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ); argsman.AddArg("-zmqpubhashgovernanceobject=
", "Enable publish hash of governance objects (like proposals) in
", ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ); @@ -1618,7 +1618,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) } #endif // ENABLE_WALLET -#if ENABLE_ZMQ +#ifdef ENABLE_ZMQ RegisterZMQRPCCommands(tableRPC); #endif @@ -1813,7 +1813,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) std::string host_out; uint16_t port_out{0}; if (!SplitHostPort(socket_addr, port_out, host_out)) { -#if HAVE_SOCKADDR_UN +#ifdef HAVE_SOCKADDR_UN // Allow unix domain sockets for some options e.g. unix:/some/file/path if (!unix || socket_addr.find(ADDR_PREFIX_UNIX) != 0) { return InitError(InvalidPortErrMsg(arg, socket_addr)); @@ -1966,7 +1966,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) return InitError(ResolveErrMsg("externalip", strAddr)); } -#if ENABLE_ZMQ +#ifdef ENABLE_ZMQ g_zmq_notification_interface = CZMQNotificationInterface::Create( [&chainman = node.chainman](CBlock& block, const CBlockIndex& index) { assert(chainman); diff --git a/src/netbase.cpp b/src/netbase.cpp index d885f2efdab8..bed9c49c75d4 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -24,7 +24,7 @@ #include #include -#if HAVE_SOCKADDR_UN +#ifdef HAVE_SOCKADDR_UN #include #endif @@ -228,7 +228,7 @@ CService LookupNumeric(const std::string& name, uint16_t portDefault, DNSLookupF bool IsUnixSocketPath(const std::string& name) { -#if HAVE_SOCKADDR_UN +#ifdef HAVE_SOCKADDR_UN if (name.find(ADDR_PREFIX_UNIX) != 0) return false; // Split off "unix:" prefix @@ -512,7 +512,7 @@ std::unique_ptr CreateSockOS(sa_family_t address_family) if (address_family == AF_UNSPEC) return nullptr; int protocol{IPPROTO_TCP}; -#if HAVE_SOCKADDR_UN +#ifdef HAVE_SOCKADDR_UN if (address_family == AF_UNIX) protocol = 0; #endif @@ -547,7 +547,7 @@ std::unique_ptr CreateSockOS(sa_family_t address_family) return nullptr; } -#if HAVE_SOCKADDR_UN +#ifdef HAVE_SOCKADDR_UN if (address_family == AF_UNIX) return sock; #endif @@ -655,7 +655,7 @@ std::unique_ptr Proxy::Connect() const if (!m_is_unix_socket) return ConnectDirectly(proxy, /*manual_connection=*/true); -#if HAVE_SOCKADDR_UN +#ifdef HAVE_SOCKADDR_UN auto sock = CreateSock(AF_UNIX); if (!sock) { LogPrintLevel(BCLog::NET, BCLog::Level::Error, "Cannot create a socket for connecting to %s\n", m_unix_socket_path); diff --git a/src/randomenv.cpp b/src/randomenv.cpp index 047ca914b38e..af74b380868c 100644 --- a/src/randomenv.cpp +++ b/src/randomenv.cpp @@ -43,15 +43,15 @@ #if HAVE_DECL_GETIFADDRS && HAVE_DECL_FREEIFADDRS #include #endif -#if HAVE_SYSCTL +#ifdef HAVE_SYSCTL #include -#if HAVE_VM_VM_PARAM_H +#ifdef HAVE_VM_VM_PARAM_H #include #endif -#if HAVE_SYS_RESOURCES_H +#ifdef HAVE_SYS_RESOURCES_H #include #endif -#if HAVE_SYS_VMMETER_H +#ifdef HAVE_SYS_VMMETER_H #include #endif #endif @@ -166,7 +166,7 @@ void AddPath(CSHA512& hasher, const char *path) } #endif -#if HAVE_SYSCTL +#ifdef HAVE_SYSCTL template void AddSysctl(CSHA512& hasher) { @@ -278,7 +278,7 @@ void RandAddDynamicEnv(CSHA512& hasher) AddFile(hasher, "/proc/self/status"); #endif -#if HAVE_SYSCTL +#ifdef HAVE_SYSCTL # ifdef CTL_KERN # if defined(KERN_PROC) && defined(KERN_PROC_ALL) AddSysctl(hasher); @@ -423,7 +423,7 @@ void RandAddStaticEnv(CSHA512& hasher) // For MacOS/BSDs, gather data through sysctl instead of /proc. Not all of these // will exist on every system. -#if HAVE_SYSCTL +#ifdef HAVE_SYSCTL # ifdef CTL_HW # ifdef HW_MACHINE AddSysctl(hasher); diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index 8da6d0e80563..d8cfbbf36961 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -37,7 +37,7 @@ static const CRPCConvertParam vRPCConvertParams[] = { "setmocktime", 0, "timestamp" }, { "mockscheduler", 0, "delta_time" }, { "utxoupdatepsbt", 1, "descriptors" }, -#if ENABLE_MINER +#ifdef ENABLE_MINER { "generatetoaddress", 0, "nblocks" }, { "generatetoaddress", 2, "maxtries" }, { "generatetodescriptor", 0, "num_blocks" }, diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index d63c50dbf228..a7988416f98b 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -136,7 +136,7 @@ static RPCHelpMan getnetworkhashps() }; } -#if ENABLE_MINER +#ifdef ENABLE_MINER static bool GenerateBlock(ChainstateManager& chainman, CBlock& block, uint64_t& max_tries, std::shared_ptr& block_out, bool process_new_block) { block_out.reset(); diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp index 939d39ae9b89..4e822eedda8f 100644 --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -405,7 +405,7 @@ BOOST_AUTO_TEST_CASE(rpc_ban) BOOST_CHECK_EQUAL(adr.get_str(), "2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/128"); } -#if ENABLE_MINER +#ifdef ENABLE_MINER BOOST_AUTO_TEST_CASE(rpc_convert_values_generatetoaddress) { UniValue result;