src/rpcmasternode.cpp
// This command is retained for backwards compatibility, but is depreciated.
// Future removal of this command is planned to keep things clean.
This command is retained for backwards compatibility, but is depreciated.
Future removal of this command is planned to keep things clean.
This command is retained for backwards compatibility but is depreciated . Future removal of this command is planned to keep things clean .
Value masternode(const Array& params, bool fHelp)
{
    string strCommand;
    if (params.size() >= 1)
        strCommand = params[0].get_str();
    if (fHelp ||
        (strCommand != "start" && strCommand != "start-alias" && strCommand != "start-many" && strCommand != "start-all" && strCommand != "start-missing" &&
            strCommand != "start-disabled" && strCommand != "list" && strCommand != "list-conf" && strCommand != "count" && strCommand != "enforce" &&
            strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" &&
            strCommand != "outputs" && strCommand != "status" && strCommand != "calcscore"))
        throw runtime_error(
            "masternode \"command\"...\n"
            "\nSet of commands to execute masternode related actions\n"
            "This command is depreciated, please see individual command documentation for future reference\n\n"
            "\nArguments:\n"
            "1. \"command\"        (string or set of strings, required) The command to execute\n"
            "\nAvailable commands:\n"
            "  count        - Print count information of all known masternodes\n"
            "  current      - Print info on current masternode winner\n"
            "  debug        - Print masternode status\n"
            "  genkey       - Generate new masternodeprivkey\n"
            "  outputs      - Print masternode compatible outputs\n"
            "  start        - Start masternode configured in bitradio.conf\n"
            "  start-alias  - Start single masternode by assigned alias configured in masternode.conf\n"
            "  start-<mode> - Start masternodes configured in masternode.conf (<mode>: 'all', 'missing', 'disabled')\n"
            "  status       - Print masternode status information\n"
            "  list         - Print list of all known masternodes (see masternodelist for more info)\n"
            "  list-conf    - Print masternode.conf in JSON format\n"
            "  winners      - Print list of masternode winners\n");
    if (strCommand == "list") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return listmasternodes(newParams, fHelp);
    }
    if (strCommand == "connect") {
        Array newParams(params.size() -1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return masternodeconnect(newParams, fHelp);
    }
    if (strCommand == "count") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return getmasternodecount(newParams, fHelp);
    }
    if (strCommand == "current") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return masternodecurrent(newParams, fHelp);
    }
    if (strCommand == "debug") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return masternodedebug(newParams, fHelp);
    }
    if (strCommand == "start" || strCommand == "start-alias" || strCommand == "start-many" || strCommand == "start-all" || strCommand == "start-missing" || strCommand == "start-disabled") {
        return startmasternode(params, fHelp);
    }
    if (strCommand == "genkey") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return createmasternodekey(newParams, fHelp);
    }
    if (strCommand == "list-conf") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return listmasternodeconf(newParams, fHelp);
    }
    if (strCommand == "outputs") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return getmasternodeoutputs(newParams, fHelp);
    }
    if (strCommand == "status") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return getmasternodestatus(newParams, fHelp);
    }
    if (strCommand == "winners") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return getmasternodewinners(newParams, fHelp);
    }
    if (strCommand == "calcscore") {
        Array newParams(params.size() - 1);
        std::copy(params.begin() + 1, params.end(), newParams.begin());
        return getmasternodescores(newParams, fHelp);
    }
    return Value::null;
}
Value masternode ( const Array & params , bool fHelp ) { string strCommand ; if ( params . size ( ) >= 1 ) strCommand = params [ 0 ] . get_str ( ) ; if ( fHelp || ( strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " && strCommand != " " ) ) throw runtime_error ( " \" \" \n " " \n \n " " \n \n " " \n \n " " \" \" \n " " \n \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " " \n " ) ; if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return listmasternodes ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return masternodeconnect ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return getmasternodecount ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return masternodecurrent ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return masternodedebug ( newParams , fHelp ) ; } if ( strCommand == " " || strCommand == " " || strCommand == " " || strCommand == " " || strCommand == " " || strCommand == " " ) { return startmasternode ( params , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return createmasternodekey ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return listmasternodeconf ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return getmasternodeoutputs ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return getmasternodestatus ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return getmasternodewinners ( newParams , fHelp ) ; } if ( strCommand == " " ) { Array newParams ( params . size ( ) - 1 ) ; std :: copy ( params . begin ( ) + 1 , params . end ( ) , newParams . begin ( ) ) ; return getmasternodescores ( newParams , fHelp ) ; } return Value :: null ; }
This command is retained for backwards compatibility, but is depreciated.
This command is retained for backwards compatibility but is depreciated .