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

Code before:

    // Ignore SIGPIPE, otherwise it will bring the daemon down if the client closes unexpectedly
    signal(SIGPIPE, SIG_IGN);
#else
    SetConsoleCtrlHandler(consoleCtrlHandler, true);
#endif

    std::set_new_handler(new_handler_terminate);

    return true;
}

bool AppInitParameterInteraction(const ArgsManager& args)
{
    const CChainParams& chainparams = Params();
    // ********************************************************* Step 2: parameter interactions

    // also see: InitParameterInteraction()

    // We removed checkpoints but keep the option to warn users who still have it in their config.
    if (args.IsArgSet("-checkpoints")) {
        InitWarning(_("Option '-checkpoints' is set but checkpoints were removed. This option has no effect."));
    }

    if (args.IsArgSet("-datacarriersize") || args.IsArgSet("-datacarrier")) {
        InitWarning(_("Options '-datacarrier' or '-datacarriersize' are set but are marked as deprecated and are expected to be removed in a future version."));
    }

    // We no longer limit the orphanage based on number of transactions but keep the option to warn users who still have it in their config.
    if (args.IsArgSet("-maxorphantx")) {
        InitWarning(_("Option '-maxorphantx' is set but no longer has any effect (see release notes). Please remove it from your configuration."));
    }

    // Error if network-specific options (-addnode, -connect, etc) are
    // specified in default section of config file, but not overridden
    // on the command line or in this chain's section of the config file.
    ChainType chain = args.GetChainType();
    if (chain == ChainType::SIGNET) {
        LogInfo("Signet derived magic (message start): %s", HexStr(chainparams.MessageStart()));
    }
    bilingual_str errors;
    for (const auto& arg : args.GetUnsuitableSectionOnlyArgs()) {
        errors += strprintf(_("Config setting for %s only applied on %s network when in [%s] section."), arg, ChainTypeToString(chain), ChainTypeToString(chain)) + Untranslated("\n");
    }

    if (!errors.empty()) {
        return InitError(errors);
    }

    // Testnet3 deprecation warning
    if (chain == ChainType::TESTNET) {

Review comment (suggestion):
Maybe just remove the `"expected to be removed in a future version"` sentence.
```c++
        InitWarning(_("Options '-datacarrier' or '-datacarriersize' are set but are marked as deprecated and the use of it is discouraged."));
```

Code after:

    // Ignore SIGPIPE, otherwise it will bring the daemon down if the client closes unexpectedly
    signal(SIGPIPE, SIG_IGN);
#else
    SetConsoleCtrlHandler(consoleCtrlHandler, true);
#endif

    std::set_new_handler(new_handler_terminate);

    return true;
}

bool AppInitParameterInteraction(const ArgsManager& args)
{
    const CChainParams& chainparams = Params();
    // ********************************************************* Step 2: parameter interactions

    // also see: InitParameterInteraction()

    // We removed checkpoints but keep the option to warn users who still have it in their config.
    if (args.IsArgSet("-checkpoints")) {
        InitWarning(_("Option '-checkpoints' is set but checkpoints were removed. This option has no effect."));
    }

    // We no longer limit the orphanage based on number of transactions but keep the option to warn users who still have it in their config.
    if (args.IsArgSet("-maxorphantx")) {
        InitWarning(_("Option '-maxorphantx' is set but no longer has any effect (see release notes). Please remove it from your configuration."));
    }

    // Error if network-specific options (-addnode, -connect, etc) are
    // specified in default section of config file, but not overridden
    // on the command line or in this chain's section of the config file.
    ChainType chain = args.GetChainType();
    if (chain == ChainType::SIGNET) {
        LogInfo("Signet derived magic (message start): %s", HexStr(chainparams.MessageStart()));
    }
    bilingual_str errors;
    for (const auto& arg : args.GetUnsuitableSectionOnlyArgs()) {
        errors += strprintf(_("Config setting for %s only applied on %s network when in [%s] section."), arg, ChainTypeToString(chain), ChainTypeToString(chain)) + Untranslated("\n");
    }

    if (!errors.empty()) {
        return InitError(errors);
    }

    // Testnet3 deprecation warning
    if (chain == ChainType::TESTNET) {
        LogInfo("Warning: Support for testnet3 is deprecated and will be removed in an upcoming release. Consider switching to testnet4.\n");
    }

    // Warn if unrecognized section name are present in the config file.