Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Qt] Re-work settings restart and saving flow #1113

Merged

Conversation

Fuzzbawls
Copy link
Collaborator

@Fuzzbawls Fuzzbawls commented Nov 11, 2019

After changing a settings option that requires a wallet restart, retain
any command line argument that was passed to the current program session
and pass them to the restarted program session.

Also, address #1114 by allowing the option to postpone wallet restart on settings change.

After changing a settings option that requires a wallet restart, retain
any command line argument that was passed to the current program session
and pass them to the restarted program session.
@Fuzzbawls Fuzzbawls added the GUI label Nov 11, 2019
@Fuzzbawls Fuzzbawls added this to the 4.0.0 milestone Nov 11, 2019
@Fuzzbawls Fuzzbawls self-assigned this Nov 11, 2019
@random-zebra
Copy link

This could lead to unintended behaviour when for example the wallet was previously started with rescan, reindex or zapwallettxes or other repair options (and those operations completed fine). Maybe it would be better to remove them if present.

    args.removeAll(SALVAGEWALLET);
    args.removeAll(RESCAN);
    args.removeAll(ZAPTXES1);
    args.removeAll(ZAPTXES2);
    args.removeAll(UPGRADEWALLET);
    args.removeAll(REINDEX);

In the event that the wallet was started with one of the repair options,
remove those options from the restarted session.
@Fuzzbawls
Copy link
Collaborator Author

@random-zebra added a second commit to sanitize any repair args, and move their declaration to the more universal qtutils.h so as to avoid code duplication.

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 93f1c03

@Fuzzbawls Fuzzbawls changed the title [Qt] Retain command line arguments when restarting [Qt] Retain CLI options on restart and don't force restart on settings save Nov 18, 2019
@Fuzzbawls Fuzzbawls changed the title [Qt] Retain CLI options on restart and don't force restart on settings save [Qt] Re-work settings restart and saving flow Nov 18, 2019
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 93f1c03

furszy added a commit that referenced this pull request Nov 19, 2019
93f1c03 [Qt] Don't force wallet restart on settings save (Fuzzbawls)
22836a7 [Qt] Sanitize restart params when saving settings (Fuzzbawls)
b0ed86e [Qt] Retain command line arguments when restarting (Fuzzbawls)

Pull request description:

  After changing a settings option that requires a wallet restart, retain
  any command line argument that was passed to the current program session
  and pass them to the restarted program session.

  Also, address #1114 by allowing the option to postpone wallet restart on settings change.

ACKs for top commit:
  random-zebra:
    ACK 93f1c03
  furszy:
    ACK 93f1c03

Tree-SHA512: 35c0801486227ad4573aabb0485e018a563dc5542bbee663fae5fc41b91748664123b62372d7a0f161bded85bcaa5195664cf78a7c9d3696bac7d7b1f1f18442
@furszy furszy merged commit 93f1c03 into PIVX-Project:master Nov 19, 2019
@Fuzzbawls Fuzzbawls deleted the 2019_settings-save-restart-retain-args branch January 9, 2020 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants