diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 7da5d6763c..481e099afa 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -820,8 +820,17 @@ void RPCConsole::walletReindex() void RPCConsole::buildParameterlist(QString arg) { // Get command-line arguments and remove the application name - QStringList args = QApplication::arguments(); - args.removeFirst(); + QStringList args; + + for (const auto& [key, values] : gArgs.GetCommandLineArgs()) { + for (const auto& value : values) { + if (value.getValStr().empty()) { + args << QString::fromStdString("-" + key); + } else { + args << QString::fromStdString("-" + key + "=" + value.getValStr()); + } + } + } // Remove existing repair-options args.removeAll(RESCAN1);