daemon: warn user on specifiying ZMQ args with --no-zmq

Resolves https://github.com/monero-project/monero/issues/9127

(cherry picked from commit dd0fb6c7552330a088033b0cfba0ba570bbbfd15)
This commit is contained in:
jeffro256
2026-05-05 18:19:54 -04:00
committed by jwinterm
parent a3a824d288
commit 77cd1986ac
+19
View File
@@ -124,6 +124,25 @@ public:
core.get().get_blockchain_storage().add_miner_notify(cryptonote::listener::zmq_pub::miner_data{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");
}
}
}
};