[wallet-tool] Close bdb when flushing wallet #15390

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:wallet_flush changing 1 files +3 −3
  1. jnewbery commented at 5:56 pm on February 12, 2019: member
    bdb would not be closed when closing the wallet in wallet-tool. Fix this by calling wallet->flush with true.
  2. jnewbery commented at 5:57 pm on February 12, 2019: member

    Suggested by @MarcoFalke here: #13926 (review)

    ping @promag

  3. jnewbery force-pushed on Feb 12, 2019
  4. MarcoFalke added this to the milestone 0.18.0 on Feb 12, 2019
  5. MarcoFalke added the label Wallet on Feb 12, 2019
  6. [wallet] Close bdb when flushing wallet.
    bdb would not be closed when closing the wallet in wallet-tool. Fix this
    by calling wallet->flush with true.
    318b1f7af1
  7. in src/wallet/wallet.cpp:96 in d4d26d08f2 outdated
    92@@ -93,7 +93,7 @@ static void ReleaseWallet(CWallet* wallet)
    93     // so that it's in sync with the current chainstate.
    94     wallet->WalletLogPrintf("Releasing wallet\n");
    95     wallet->BlockUntilSyncedToCurrentChain();
    96-    wallet->Flush();
    97+    wallet->Flush(true);
    


    promag commented at 6:04 pm on February 12, 2019:
    This is not right, this will mess other dbs in the same env.

    jnewbery commented at 6:28 pm on February 12, 2019:
    Thanks @promag . Fixed
  8. jnewbery force-pushed on Feb 12, 2019
  9. laanwj commented at 5:33 pm on February 13, 2019: member
    utACK 318b1f7af113fe16b67cf3ed4d9bbab3dd4c5e4e
  10. MarcoFalke renamed this:
    [wallet] Close bdb when flushing wallet.
    [wallet-tool] Close bdb when flushing wallet
    on Feb 13, 2019
  11. MarcoFalke commented at 5:55 pm on February 13, 2019: member
    Changed title prefix to [wallet-tool]
  12. promag commented at 8:13 pm on February 13, 2019: member
    Is there currently a strong reason to have the shutdown argument in Flush()?
  13. MarcoFalke commented at 8:49 pm on February 13, 2019: member
    @promag I don’t think so, what would be the alternative?
  14. MarcoFalke referenced this in commit 9c4a90040d on Feb 13, 2019
  15. MarcoFalke merged this on Feb 13, 2019
  16. MarcoFalke closed this on Feb 13, 2019

  17. jnewbery commented at 8:59 pm on February 13, 2019: member

    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

  18. promag commented at 9:09 pm on February 13, 2019: member

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

    utACK 318b1f7.

  19. jasonbcox referenced this in commit 7478bfcdab on Sep 3, 2020
  20. 6293 referenced this in commit a9a1a853d1 on Nov 27, 2021
  21. MarcoFalke locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me