aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeffro256 <jeffro256@tutanota.com>2024-01-27 16:19:11 -0600
committerjeffro256 <jeffro256@tutanota.com>2024-02-07 00:04:46 -0600
commit8d25418df0ab1303284a4118fee88a3e8b1cc715 (patch)
tree534b61c9309fb68672a36d094d2370e9f660fad4
parentMerge pull request #9126 (diff)
downloadmonero-8d25418df0ab1303284a4118fee88a3e8b1cc715.tar.xz
daemon: warn user on specifiying ZMQ args with --no-zmq
Resolves https://github.com/monero-project/monero/issues/9127
-rw-r--r--src/daemon/daemon.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp
index 97dad9357..1d4142c84 100644
--- a/src/daemon/daemon.cpp
+++ b/src/daemon/daemon.cpp
@@ -124,6 +124,25 @@ public:
core.get().set_txpool_listener(cryptonote::listener::zmq_pub::txpool_add{shared});
}
}
+ else // if --no-zmq specified
+ {
+ // Assert that none of --zmq-rpc-bind-port, --zmq-rpc-bind-ip, and --zmq-pub are specified b/c
+ // that does not make semantic sense with --no-zmq.
+ if (command_line::get_arg(vm, daemon_args::arg_zmq_rpc_bind_port) !=
+ daemon_args::arg_zmq_rpc_bind_port.default_value)
+ {
+ MWARNING("WARN: --zmq-rpc-bind-port has no effect because --no-zmq was specified");
+ }
+ else if (command_line::get_arg(vm, daemon_args::arg_zmq_rpc_bind_ip) !=
+ daemon_args::arg_zmq_rpc_bind_ip.default_value)
+ {
+ MWARNING("WARN: --zmq-rpc-bind-ip has no effect because --no-zmq was specified");
+ }
+ else if (!command_line::get_arg(vm, daemon_args::arg_zmq_pub).empty())
+ {
+ MWARNING("WARN: --zmq-pub has no effect because --no-zmq was specified");
+ }
+ }
}
};