Skip to content

Conversation

@jnewbery
Copy link
Contributor

@jnewbery jnewbery commented Feb 12, 2019

bdb would not be closed when closing the wallet in wallet-tool. Fix this by calling wallet->flush with true.

@jnewbery
Copy link
Contributor Author

Suggested by @MarcoFalke here: #13926 (comment)

ping @promag

Copy link
Contributor

Choose a reason for hiding this comment

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

This is not right, this will mess other dbs in the same env.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @promag . Fixed

bdb would not be closed when closing the wallet in wallet-tool. Fix this
by calling wallet->flush with true.
@laanwj
Copy link
Member

laanwj commented Feb 13, 2019

utACK 318b1f7

@maflcko maflcko changed the title [wallet] Close bdb when flushing wallet. [wallet-tool] Close bdb when flushing wallet Feb 13, 2019
@maflcko
Copy link
Member

maflcko commented Feb 13, 2019

Changed title prefix to [wallet-tool]

@meshcollider
Copy link
Contributor

utACK 318b1f7

@promag
Copy link
Contributor

promag commented Feb 13, 2019

Is there currently a strong reason to have the shutdown argument in Flush()?

@maflcko
Copy link
Member

maflcko commented Feb 13, 2019

@promag I don't think so, what would be the alternative?

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Feb 13, 2019
318b1f7 [wallet] Close bdb when flushing wallet. (John Newbery)

Pull request description:

  bdb would not be closed when closing the wallet in wallet-tool. Fix this by calling wallet->flush with true.

Tree-SHA512: f722e527e4806eca5254221e944f57853d11bf89a9264309fa558a6cc2b23feefb7bb2963e87b4fad9cfb31ac4cffe563688988e0614a481a8ff1d393aceb132
@maflcko maflcko merged commit 318b1f7 into bitcoin:master Feb 13, 2019
@jnewbery
Copy link
Contributor Author

Is there currently a strong reason to have the shutdown argument in Flush()?

I don't believe so. It's a holdover from https://github.com/bitcoin/bitcoin/pull/10767/files

@promag
Copy link
Contributor

promag commented Feb 13, 2019

@jnewbery @MarcoFalke thanks, so I guess we all agree it can be cleaned up.

utACK 318b1f7.

jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Sep 3, 2020
Summary:
[wallet] Close bdb when flushing wallet. (John Newbery)

Pull request description:

  bdb would not be closed when closing the wallet in wallet-tool. Fix this by calling wallet->flush with true.

---

Backport of Core [[bitcoin/bitcoin#15390 | PR15390]]

Test Plan:
  ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7327
6293 pushed a commit to 6293/dash that referenced this pull request Nov 27, 2021
318b1f7 [wallet] Close bdb when flushing wallet. (John Newbery)

Pull request description:

  bdb would not be closed when closing the wallet in wallet-tool. Fix this by calling wallet->flush with true.

Tree-SHA512: f722e527e4806eca5254221e944f57853d11bf89a9264309fa558a6cc2b23feefb7bb2963e87b4fad9cfb31ac4cffe563688988e0614a481a8ff1d393aceb132
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
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.

5 participants