[Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) #8977

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2016/10/fix_wallet_init changing 3 files +19 −11
  1. jonasschnelli commented at 7:27 AM on October 20, 2016: contributor

    Cleanup of #8928. Also "hides" ThreadFlushWalletDB from init.cpp.

    This moves ReacceptWalletTransactions further down so that it will be executed after the connection manager has been started. I think this should not be a problem. @TheBlueMatt: would be nice if you could do a retest regarding the segfaults in init you have discovered.

  2. [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) cab1da745b
  3. jonasschnelli added the label Refactoring on Oct 20, 2016
  4. jonasschnelli added the label Wallet on Oct 20, 2016
  5. MarcoFalke commented at 7:38 AM on October 20, 2016: member

    This moves ReacceptWalletTransactions further down so that it will be executed after the connection manager has been started. I think this should not be a problem.

    This is just the way it was before: https://github.com/bitcoin/bitcoin/blob/0.12/src/init.cpp#L1671-L1675

    utACK cab1da745b2a36407bb9493343cc74213854419d

    (Also, can't reproduce the segfault.)

  6. MarcoFalke added this to the milestone 0.14.0 on Oct 29, 2016
  7. MarcoFalke commented at 10:32 PM on October 29, 2016: member

    Assigning .14 milestone, as this helps with #7965

  8. in src/wallet/wallet.cpp:None in cab1da745b
    3471 | @@ -3472,6 +3472,16 @@ bool CWallet::InitLoadWallet()
    3472 |      return true;
    3473 |  }
    3474 |  
    3475 | +void CWallet::postInitProcess(boost::thread_group& threadGroup)
    


    laanwj commented at 8:36 PM on November 2, 2016:

    The wallet flush thread is interesting. At some point I guess we want to make it per-wallet, and pass in the wallet instead of wallet file name. Also the wallet needs to be able to shut it down again.

    Right now there can only be one wallet flush thread at a time, for one wallet.

    Another idea would be to move the flushing to a scheduler job instead, to avoid having lots of threads that are waiting most of the time (w/ multiwallet).

    Anyhow, this is fine for now.

  9. laanwj merged this on Nov 2, 2016
  10. laanwj closed this on Nov 2, 2016

  11. laanwj referenced this in commit 6a1343f73b on Nov 2, 2016
  12. codablock referenced this in commit 949a5f5b16 on Sep 19, 2017
  13. codablock referenced this in commit 9b9f86a59b on Jan 13, 2018
  14. andvgal referenced this in commit 1f853da8e6 on Jan 6, 2019
  15. MarcoFalke locked this on Sep 8, 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: 2026-04-21 15:15 UTC

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