Skip to content

Conversation

@promag
Copy link
Contributor

@promag promag commented May 5, 2020

This PR ensures each loaded wallet has a dedicated coin control in the send view which is manipulated by the coin control dialog.

This is an alternative to #17457. Two main differences are:

  • scope reduced - no unnecessary changes unrelated to the fix;
  • approach taken - coin control instance now belongs to the send view.

All problems raised in #17457 reviews no longer apply due to the approach taken - #17457 (review) and #17457 (comment))

No change in behavior if only one wallet is loaded.

Closes #15725.

@promag
Copy link
Contributor Author

promag commented May 5, 2020

If possible tag 0.20. @Sjors @hebasto @gwillen would ❤️ some reviews.

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK a8b5f1b. Code changes are very straightforward, just replacing global CCoinControl object with SendCoinsDialog member. Not sure if this means coin control settings are reset between payments. It would be good to note in the PR description or release notes if single wallet behavior is affected

@promag
Copy link
Contributor Author

promag commented May 6, 2020

Not sure if this means coin control settings are reset between payments.

Yes, and new change shows if coin control dialog is opened again.

It would be good to note in the PR description or release notes if single wallet behavior is affected

Yes, at least that's what I expect - I'll note it.

@DrahtBot
Copy link
Contributor

DrahtBot commented May 6, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

Approach ACK a8b5f1b, tested on Linux Mint 19.3: #15725 is fixed.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK a8b5f1b

@jonasschnelli
Copy link
Contributor

Concept ACK.
Will detail review and test soon.
Could be a 0.20 bugfix.

Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

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

tACK a8b5f1b


GUIUtil::handleCloseWindowShortcut(this);

if(_model->getOptionsModel() && _model->getAddressTableModel())
Copy link
Member

Choose a reason for hiding this comment

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

This needs an assert that _model isn't nullptr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will crash anyway.

Copy link
Member

Choose a reason for hiding this comment

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

assert crashes are marginally easier to debug afaik

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. But note that the model is received in the constructor and this dialog is instanced in SendCoinsDialog which already has the model set.

I'll add the assertion if I had to push again for some reason or if others think the same.

@jonasschnelli
Copy link
Contributor

utACK a8b5f1b

@jonasschnelli jonasschnelli merged commit 246e878 into bitcoin:master May 13, 2020
@promag promag deleted the 2019-11-fix-15725.2 branch May 13, 2020 08:29
label->setVisible(nChange < 0);
}

CCoinControl* CoinControlDialog::coinControl()
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for getting rid of this.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 14, 2020
…ts loaded

a8b5f1b gui: Fix manual coin control with multiple wallets loaded (João Barbosa)

Pull request description:

  This PR ensures each loaded wallet has a dedicated coin control in the send view which is manipulated by the coin control dialog.

  This is an alternative to bitcoin#17457. Two main differences are:
   - scope reduced - no unnecessary changes unrelated to the fix;
   - approach taken - coin control instance now belongs to the send view.

  All problems raised in bitcoin#17457 reviews no longer apply due to the approach taken - bitcoin#17457 (review) and bitcoin#17457 (comment))

  No change in behavior if only one wallet is loaded.

  Closes bitcoin#15725.

ACKs for top commit:
  jonasschnelli:
    utACK a8b5f1b
  ryanofsky:
    Code review ACK a8b5f1b. Code changes are very straightforward, just replacing global CCoinControl object with SendCoinsDialog member. Not sure if this means coin control settings are reset between payments. It would be good to note in the PR description or release notes if single wallet behavior is affected
  hebasto:
    ACK a8b5f1b
  Sjors:
    tACK a8b5f1b

Tree-SHA512: 3ad9c51bab6f28ec0e90efbd6f43fa510c81dafb2eff0b8c3724efcee3e030054a10be013e27cefe35763374c5f6d7af8c02658736964f733d7e38b646b5df65
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request May 15, 2020
maflcko pushed a commit that referenced this pull request May 15, 2020
245c862 test: disable script fuzz tests (fanquake)
9a8fb4c fuzz: Remove enumeration of expected deserialization exceptions in ProcessMessage(...) fuzzer (practicalswift)
6161c94 [net processing] Only send a getheaders for one block in an INV (John Newbery)
cf2a6e2 test: Remove const to work around compiler error on xenial (Wladimir J. van der Laan)
cc7d344 miner: Avoid stack-use-after-return in validationinterface (MarcoFalke)
37a6207 test: Add unregister_validation_interface_race test (MarcoFalke)
ff4dc20 gui: Fix manual coin control with multiple wallets loaded (João Barbosa)
ed0afe8 test: Add test for conflicted wallet tx notifications (Russell Yanofsky)
251e321 rpc: Relock wallet only if most recent callback (João Barbosa)
ca4dac4 rpc: Add mutex to guard deadlineTimers (João Barbosa)
a3fe458 [docs] Improve commenting in ProcessGetData() (John Newbery)
011532e [test] test that an invalid GETDATA doesn't prevent processing of future messages (Amiti Uttarwar)
1e73d72 [net processing] ignore unknown INV types in GETDATA messages (Amiti Uttarwar)
fb82173 [net processing] ignore tx GETDATA from blocks-only peers (Amiti Uttarwar)
315ae14 gui: Fix itemWalletAddress leak when not tree mode (João Barbosa)

Pull request description:

  Backports the following PRs to the 0.20 branch:

  * #18578: gui: Fix leak in CoinControlDialog::updateView
  * #18808: [net processing] Drop unknown types in getdata
  * #18814: rpc: Relock wallet only if most recent callback
  * #18878: test: Add test for conflicted wallet tx notifications
  * #18894: gui: Fix manual coin control with multiple wallets loaded
  * #18742: miner: Avoid stack-use-after-return in validationinterface
  * #18962: net processing: Only send a getheaders for one block in an INV
  * #18975: test: Remove const to work around compiler error on xenial

ACKs for top commit:
  promag:
    Tested ACK 245c862 coin control with multiple wallets.
  laanwj:
    ACK 245c862
  MarcoFalke:
    ACK 245c862 solved the conflicts myself as a sanity check. Did not re-review 🍷

Tree-SHA512: 285e5a5fad5bbeba6032742c65dc68836e8eccfcceda9e69fec4ddd162a3f61679a96f9bbe3d434267835af67c21ac4c05accf6f63e827c2eb47203c6daafe31
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Oct 16, 2020
…ts loaded

a8b5f1b gui: Fix manual coin control with multiple wallets loaded (João Barbosa)

Pull request description:

  This PR ensures each loaded wallet has a dedicated coin control in the send view which is manipulated by the coin control dialog.

  This is an alternative to bitcoin#17457. Two main differences are:
   - scope reduced - no unnecessary changes unrelated to the fix;
   - approach taken - coin control instance now belongs to the send view.

  All problems raised in bitcoin#17457 reviews no longer apply due to the approach taken - bitcoin#17457 (review) and bitcoin#17457 (comment))

  No change in behavior if only one wallet is loaded.

  Closes bitcoin#15725.

ACKs for top commit:
  jonasschnelli:
    utACK a8b5f1b
  ryanofsky:
    Code review ACK a8b5f1b. Code changes are very straightforward, just replacing global CCoinControl object with SendCoinsDialog member. Not sure if this means coin control settings are reset between payments. It would be good to note in the PR description or release notes if single wallet behavior is affected
  hebasto:
    ACK a8b5f1b
  Sjors:
    tACK a8b5f1b

Tree-SHA512: 3ad9c51bab6f28ec0e90efbd6f43fa510c81dafb2eff0b8c3724efcee3e030054a10be013e27cefe35763374c5f6d7af8c02658736964f733d7e38b646b5df65
UdjinM6 added a commit to dashpay/dash that referenced this pull request Nov 9, 2020
…aded (#3777)

* Merge bitcoin#18894: gui: Fix manual coin control with multiple wallets loaded

a8b5f1b gui: Fix manual coin control with multiple wallets loaded (João Barbosa)

Pull request description:

  This PR ensures each loaded wallet has a dedicated coin control in the send view which is manipulated by the coin control dialog.

  This is an alternative to bitcoin#17457. Two main differences are:
   - scope reduced - no unnecessary changes unrelated to the fix;
   - approach taken - coin control instance now belongs to the send view.

  All problems raised in bitcoin#17457 reviews no longer apply due to the approach taken - bitcoin#17457 (review) and bitcoin#17457 (comment))

  No change in behavior if only one wallet is loaded.

  Closes bitcoin#15725.

ACKs for top commit:
  jonasschnelli:
    utACK a8b5f1b
  ryanofsky:
    Code review ACK a8b5f1b. Code changes are very straightforward, just replacing global CCoinControl object with SendCoinsDialog member. Not sure if this means coin control settings are reset between payments. It would be good to note in the PR description or release notes if single wallet behavior is affected
  hebasto:
    ACK a8b5f1b
  Sjors:
    tACK a8b5f1b

Tree-SHA512: 3ad9c51bab6f28ec0e90efbd6f43fa510c81dafb2eff0b8c3724efcee3e030054a10be013e27cefe35763374c5f6d7af8c02658736964f733d7e38b646b5df65

* Update src/qt/coincontroldialog.cpp

Co-authored-by: PastaPastaPasta <[email protected]>

Co-authored-by: Jonas Schnelli <[email protected]>
Co-authored-by: PastaPastaPasta <[email protected]>
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 28, 2021
Summary: This is a backport of Core [[bitcoin/bitcoin#18894 | PR18894]]

Test Plan:
`ninja && src/qt/bitcoin-qt`
Open 2 wallets, open the coin control dialog and select coins, select the second wallet and open the coin control dialog again, verify that it has been updated for the new wallet (old coins and selection cleared)

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9098
backpacker69 referenced this pull request in peercoin/peercoin Mar 28, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manual coin control dialog interacts badly with multiple wallets

8 participants