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

Fix multiwallet transaction notifications #120

Merged

Conversation

promag
Copy link
Contributor

@promag promag commented Oct 28, 2020

Currently vQueueNotifications holds transactions of any wallet, but the queue is dispatched on a given wallet and it assumes notifications are of that wallet.

This means that some transactions can be missed if multiple wallets are loaded.

Fix this by having a queue for each wallet.

This is needed because next commit moves vQueueNotifications to
TransactionTablePriv member.
Drop global vQueueNotifications and make one for each wallet.
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 almost-ACK 278ad5f. I think there's a minor off by one error in the third commit, and it doesn't seem as clear as it could be, but otherwise this looks very good

src/qt/transactiontablemodel.cpp Outdated Show resolved Hide resolved
@promag promag force-pushed the 2020-10-fix-transaction-notifications branch from 278ad5f to 2414342 Compare November 1, 2020 12:56
@promag
Copy link
Contributor Author

promag commented Nov 1, 2020

@jonasschnelli @fanquake this is a bugfix.

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 2414342, I have reviewed the code and it looks OK, I agree it can be merged.

nit: Could follow our style guide (at least apply clang-format-diff.py) for non-move-only commits?

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 2414342. Only change is dropping one commit

@jonasschnelli jonasschnelli modified the milestones: 0.21.1, 0.21.0 Nov 12, 2020
@jonasschnelli
Copy link
Contributor

utACK 2414342

@jonasschnelli jonasschnelli merged commit 9bd1316 into bitcoin-core:master Nov 12, 2020
@promag promag deleted the 2020-10-fix-transaction-notifications branch November 12, 2020 11:29
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Nov 12, 2020
2414342 refactor: qt: Use vQueueNotifications.clear() (João Barbosa)
989e579 qt: Make transaction notification queue wallet specific (João Barbosa)
7b3b230 move-only: Define TransactionNotification before  TransactionTablePriv (João Barbosa)

Pull request description:

  Currently `vQueueNotifications` holds transactions of any wallet, but the queue is dispatched on a given wallet and it assumes notifications are of that wallet.

  This means that some transactions can be missed if multiple wallets are loaded.

  Fix this by having a queue for each wallet.

ACKs for top commit:
  jonasschnelli:
    utACK 2414342
  hebasto:
    ACK 2414342, I have reviewed the code and it looks OK, I agree it can be merged.
  ryanofsky:
    Code review ACK 2414342. Only change is dropping one commit

Tree-SHA512: 61beac5a16ed659e3a25ad145dbceafcef963aaf8f9838355298949ec2324e2bd760f59353cd251d30cf0334d8dc1642a1f3821d8a9eec092533b581f6ce86db
willyko pushed a commit to syscoin-core/syscoin-trimmed that referenced this pull request Nov 12, 2020
241434200ec2067673d8522fee4f1228abfd8247 refactor: qt: Use vQueueNotifications.clear() (João Barbosa)
989e579d07bb5031639060b717f7a0be15d10e29 qt: Make transaction notification queue wallet specific (João Barbosa)
7b3b2303f44031c3545651858f697a495c3ea37a move-only: Define TransactionNotification before  TransactionTablePriv (João Barbosa)

Pull request description:

  Currently `vQueueNotifications` holds transactions of any wallet, but the queue is dispatched on a given wallet and it assumes notifications are of that wallet.

  This means that some transactions can be missed if multiple wallets are loaded.

  Fix this by having a queue for each wallet.

ACKs for top commit:
  jonasschnelli:
    utACK 241434200ec2067673d8522fee4f1228abfd8247
  hebasto:
    ACK 241434200ec2067673d8522fee4f1228abfd8247, I have reviewed the code and it looks OK, I agree it can be merged.
  ryanofsky:
    Code review ACK 241434200ec2067673d8522fee4f1228abfd8247. Only change is dropping one commit

Tree-SHA512: 61beac5a16ed659e3a25ad145dbceafcef963aaf8f9838355298949ec2324e2bd760f59353cd251d30cf0334d8dc1642a1f3821d8a9eec092533b581f6ce86db

Former-commit-id: 340957c6beffff2f444a8077254b9bd02afe4b2d
apoelstra added a commit to apoelstra/elements that referenced this pull request Dec 3, 2020
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Mar 23, 2021
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 23, 2021
Summary:
This is needed because next commit moves `vQueueNotifications` to `TransactionTablePriv` member.

This is a backport of [[bitcoin-core/gui#120 | core-gui#120]]  [1/2]
bitcoin-core/gui@7b3b230

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10730
@bitcoin-core bitcoin-core 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants