mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 16:13:09 +02:00
refactor: Avoid unused-variable warning in init.cpp
This commit is contained in:
@@ -1297,7 +1297,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto &port_option : std::vector<std::pair<std::string, bool>>{
|
||||
for ([[maybe_unused]] const auto& [arg, unix] : std::vector<std::pair<std::string, bool>>{
|
||||
// arg name UNIX socket support
|
||||
{"-i2psam", false},
|
||||
{"-onion", true},
|
||||
@@ -1309,10 +1309,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
{"-zmqpubhashtx", true},
|
||||
{"-zmqpubrawblock", true},
|
||||
{"-zmqpubrawtx", true},
|
||||
{"-zmqpubsequence", true}
|
||||
{"-zmqpubsequence", true},
|
||||
}) {
|
||||
const std::string arg{port_option.first};
|
||||
const bool unix{port_option.second};
|
||||
for (const std::string& socket_addr : args.GetArgs(arg)) {
|
||||
std::string host_out;
|
||||
uint16_t port_out{0};
|
||||
|
Reference in New Issue
Block a user