Skip to content

Conversation

@furszy
Copy link
Member

@furszy furszy commented Aug 14, 2024

Coming from #29073.

Applied ryanofsky suggested changes on #29073 (comment) with few modifications coming from #18338 (comment).

The only point I did not tackle from #18338 (comment) is:

  • Move log print and flush out of ReleaseWallet into CWallet destructor

Because it would mean every CWallet object would flush data to disk during destruction. Which is not necessary for wallet tool utilities and unit tests.

furszy and others added 3 commits August 14, 2024 16:12
Releases wallet shared pointers prior to doing the
final settings update and prevent GUI races trying
to access a wallet that is no longer loaded.
And update function's documentation.
Multiple threads could try to delete the wallet at the same time.
@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 14, 2024

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

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK ryanofsky, ismaelsadeeq, achow101

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #30343 (wallet, logging: Replace WalletLogPrintf() with LogInfo() by ryanofsky)
  • #25722 (refactor: Use util::Result class for wallet loading by ryanofsky)

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

@ismaelsadeeq ismaelsadeeq 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 7a73b0b7d5e690235bcefca9b82f01442b37ad5e

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 7a73b0b7d5e690235bcefca9b82f01442b37ad5e. This is a much cleaner bugfix than I suggested in #29073. Moving the unload notification makes the shutdown sequence easier to understand, more efficient, and safe.

@furszy furszy force-pushed the 2024_wallet_shutdown branch from 7a73b0b to e37e415 Compare August 15, 2024 14:23
To better describe the function's behavior.
And add wallet name to logprint.
@furszy furszy force-pushed the 2024_wallet_shutdown branch from e37e415 to f550a8e Compare August 15, 2024 14:54
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 f550a8e. Just a simple rename since last review

@DrahtBot DrahtBot requested a review from ismaelsadeeq August 15, 2024 15:54
Copy link
Member

@ismaelsadeeq ismaelsadeeq left a comment

Choose a reason for hiding this comment

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

Re-ACK f550a8e

@achow101
Copy link
Member

ACK f550a8e

@achow101 achow101 merged commit 99ecb9a into bitcoin:master Aug 15, 2024
@furszy furszy deleted the 2024_wallet_shutdown branch August 16, 2024 13:10
@bitcoin bitcoin locked and limited conversation to collaborators Aug 16, 2025
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.

6 participants