mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge aef5ac7f2c into merged_master (Bitcoin PR bitcoin/bitcoin#29876)
This commit is contained in:
commit
b6183d9637
5 changed files with 24 additions and 20 deletions
16
src/init.cpp
16
src/init.cpp
|
|
@ -113,7 +113,7 @@
|
|||
#include <assetsdir.h> // InitGlobalAssetDir
|
||||
#include <pegins.h>
|
||||
|
||||
#if ENABLE_ZMQ
|
||||
#ifdef ENABLE_ZMQ
|
||||
#include <zmq/zmqabstractnotifier.h>
|
||||
#include <zmq/zmqnotificationinterface.h>
|
||||
#include <zmq/zmqrpc.h>
|
||||
|
|
@ -373,7 +373,7 @@ void Shutdown(NodeContext& node)
|
|||
client->stop();
|
||||
}
|
||||
|
||||
#if ENABLE_ZMQ
|
||||
#ifdef ENABLE_ZMQ
|
||||
if (g_zmq_notification_interface) {
|
||||
if (node.validation_signals) node.validation_signals->UnregisterValidationInterface(g_zmq_notification_interface.get());
|
||||
g_zmq_notification_interface.reset();
|
||||
|
|
@ -544,7 +544,7 @@ void SetupServerArgs(ArgsManager& argsman)
|
|||
argsman.AddArg("-maxreceivebuffer=<n>", strprintf("Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)", DEFAULT_MAXRECEIVEBUFFER), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-maxsendbuffer=<n>", strprintf("Maximum per-connection memory usage for the send buffer, <n>*1000 bytes (default: %u)", DEFAULT_MAXSENDBUFFER), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-maxuploadtarget=<n>", 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=<ip:port|path>", "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=<ip:port>", "Use separate SOCKS5 proxy to reach peers via Tor onion services, set -noonion to disable (default: -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
|
|
@ -557,7 +557,7 @@ void SetupServerArgs(ArgsManager& argsman)
|
|||
argsman.AddArg("-peerblockfilters", strprintf("Serve compact block filters to peers per BIP 157 (default: %u)", DEFAULT_PEERBLOCKFILTERS), 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("-port=<port>", strprintf("Listen for connections on <port> (default: %u, testnet: %u, signet: %u, regtest: %u). Not relevant for I2P (see doc/i2p.md).", defaultChainParams->GetDefaultPort(), testnetChainParams->GetDefaultPort(), signetChainParams->GetDefaultPort(), regtestChainParams->GetDefaultPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
|
||||
#if HAVE_SOCKADDR_UN
|
||||
#ifdef HAVE_SOCKADDR_UN
|
||||
argsman.AddArg("-proxy=<ip:port|path>", "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=<ip:port>", "Connect through SOCKS5 proxy, set -noproxy to disable (default: disabled)", ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_ELISION, OptionsCategory::CONNECTION);
|
||||
|
|
@ -591,7 +591,7 @@ void SetupServerArgs(ArgsManager& argsman)
|
|||
|
||||
g_wallet_init_interface.AddWalletOptions(argsman);
|
||||
|
||||
#if ENABLE_ZMQ
|
||||
#ifdef ENABLE_ZMQ
|
||||
argsman.AddArg("-zmqpubhashblock=<address>", "Enable publish hash block in <address>", ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ);
|
||||
argsman.AddArg("-zmqpubhashtx=<address>", "Enable publish hash transaction in <address>", ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ);
|
||||
argsman.AddArg("-zmqpubrawblock=<address>", "Enable publish raw block in <address>", ArgsManager::ALLOW_ANY, OptionsCategory::ZMQ);
|
||||
|
|
@ -1343,7 +1343,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
for (const auto& client : node.chain_clients) {
|
||||
client->registerRpcs();
|
||||
}
|
||||
#if ENABLE_ZMQ
|
||||
#ifdef ENABLE_ZMQ
|
||||
RegisterZMQRPCCommands(tableRPC);
|
||||
#endif
|
||||
|
||||
|
|
@ -1471,7 +1471,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));
|
||||
|
|
@ -1618,7 +1618,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](std::vector<uint8_t>& block, const CBlockIndex& index) {
|
||||
assert(chainman);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue