Repository: bitcoin/bitcoin
File: src/init.cpp (C++)

Code before:
                suffix_allowed ? param_value.substr(0, param_value.rfind('=')) : param_value};
            std::string host_out;
            uint16_t port_out{0};
            if (!SplitHostPort(param_value_hostport, port_out, host_out)) {
#ifdef HAVE_SOCKADDR_UN
                // Allow unix domain sockets for some options e.g. unix:/some/file/path
                if (!unix || !param_value.starts_with(ADDR_PREFIX_UNIX)) {
                    return InitError(InvalidPortErrMsg(param_name, param_value));
                }
#else
                return InitError(InvalidPortErrMsg(param_name, param_value));
#endif
            }
        }
    }

    return true;
}

/**
 * @brief Checks for duplicate bindings across all binding configuration.
 *
 * @param connOptions Connection options containing the binding vectors to check
 * @return std::optional<CService> containing the first duplicate found, or std::nullopt if no duplicates
 */
std::optional<CService> CheckBindingConflicts(const CConnman::Options& connOptions)
{
    std::set<CService> seen;

    // Check all whitelisted bindings
    for (const auto& wb : connOptions.vWhiteBinds) {
        if (!seen.insert(wb.m_service).second) {
            return wb.m_service;
        }
    }

    // Check regular bindings
    for (const auto& bind : connOptions.vBinds) {
        if (!seen.insert(bind).second) {
            return bind;
        }
    }

    // Check onion bindings
    for (const auto& onion_bind : connOptions.onion_binds) {
        if (!seen.insert(onion_bind).second) {
            return onion_bind;
        }
    }

    return std::nullopt;

Review comment (suggestion):
```suggestion
std::optional<CService> CheckBindingConflicts(const CConnman::Options& conn_options)
```

nit: as per the  [guidelines](https://github.com/bitcoin/bitcoin/blob/6ca6f3b37b992591726bd13b494369bee3bd6468/doc/developer-notes.md?plain=1#L38), function arguments should be `snake_case`.

Code after:
                suffix_allowed ? param_value.substr(0, param_value.rfind('=')) : param_value};
            std::string host_out;
            uint16_t port_out{0};
            if (!SplitHostPort(param_value_hostport, port_out, host_out)) {
#ifdef HAVE_SOCKADDR_UN
                // Allow unix domain sockets for some options e.g. unix:/some/file/path
                if (!unix || !param_value.starts_with(ADDR_PREFIX_UNIX)) {
                    return InitError(InvalidPortErrMsg(param_name, param_value));
                }
#else
                return InitError(InvalidPortErrMsg(param_name, param_value));
#endif
            }
        }
    }

    return true;
}

/**
 * @brief Checks for duplicate bindings across all binding configurations.
 *
 * @param[in] conn_options Connection options containing the binding vectors to check
 * @return std::optional<CService> containing the first duplicate found, or std::nullopt if no duplicates
 */
static std::optional<CService> CheckBindingConflicts(const CConnman::Options& conn_options)
{
    std::set<CService> seen;

    // Check all whitelisted bindings
    for (const auto& wb : conn_options.vWhiteBinds) {
        if (!seen.insert(wb.m_service).second) {
            return wb.m_service;
        }
    }

    // Check regular bindings
    for (const auto& bind : conn_options.vBinds) {
        if (!seen.insert(bind).second) {
            return bind;
        }
    }

    // Check onion bindings
    for (const auto& onion_bind : conn_options.onion_binds) {
        if (!seen.insert(onion_bind).second) {
            return onion_bind;
        }
    }

    return std::nullopt;