Skip to content

Commit

Permalink
qt: fetch existing parameters when building parameter list
Browse files Browse the repository at this point in the history
Co-authored-by: UdjinM6 <[email protected]>
  • Loading branch information
kwvg and UdjinM6 committed Jun 3, 2022
1 parent c54b5c7 commit 9f23974
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9f23974

Please sign in to comment.