wallet: Add missing BlockUntilSyncedToCurrentChain #22308

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2106-wallet changing 2 files +14 −9
  1. MarcoFalke commented at 8:07 AM on June 22, 2021: member

    Fixes #20975

    Also replace the wallet pointer by a reference

  2. wallet: Add missing BlockUntilSyncedToCurrentChain fadb55085a
  3. Revert "test: Add temporary logging to debug #20975"
    This reverts commit faa94961d6e38392ba068381726ed4e033367b03.
    fa27baa9c8
  4. MarcoFalke added the label Wallet on Jun 22, 2021
  5. MarcoFalke added the label RPC/REST/ZMQ on Jun 22, 2021
  6. MarcoFalke added this to the milestone 22.0 on Jun 22, 2021
  7. MarcoFalke commented at 8:12 AM on June 22, 2021: member

    Can be tested with:

    diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
    index 1e07ff23ae..07876b7d55 100644
    --- a/src/validationinterface.cpp
    +++ b/src/validationinterface.cpp
    @@ -8,6 +8,7 @@
     #include <chain.h>
     #include <consensus/validation.h>
     #include <logging.h>
    +#include <util/time.h>
     #include <primitives/block.h>
     #include <primitives/transaction.h>
     #include <scheduler.h>
    @@ -219,6 +220,7 @@ void CMainSignals::TransactionRemovedFromMempool(const CTransactionRef& tx, MemP
     
     void CMainSignals::BlockConnected(const std::shared_ptr<const CBlock> &pblock, const CBlockIndex *pindex) {
         auto event = [pblock, pindex, this] {
    +        UninterruptibleSleep(100ms);
             m_internals->Iterate([&](CValidationInterface& callbacks) { callbacks.BlockConnected(pblock, pindex); });
         };
         ENQUEUE_AND_LOG_EVENT(event, "%s: block hash=%s block height=%d", __func__,
    
  8. DrahtBot commented at 3:03 PM on June 22, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #17211 (Allow fundrawtransaction and walletcreatefundedpsbt to take external inputs by achow101)

    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.

  9. achow101 commented at 9:06 PM on June 22, 2021: member

    ACK fa27baa9c8a13239625e5a7b6c472d236fe5b9fa

    Was able to replicate the race condition on master with the provided diff, and verified it is no longer occurring with this PR.

  10. MarcoFalke merged this on Jun 22, 2021
  11. MarcoFalke closed this on Jun 22, 2021

  12. MarcoFalke deleted the branch on Jun 22, 2021
  13. sidhujag referenced this in commit fc1ee5723c on Jun 24, 2021
  14. luke-jr referenced this in commit ce12fca58b on Jun 27, 2021
  15. gwillen referenced this in commit 01766fafdf on Jun 1, 2022
  16. DrahtBot locked this on Aug 16, 2022

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-13 15:14 UTC

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