wallet: Logprint the start of a rescan #12925

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2018/04/rescan changing 1 files +3 −0
  1. jonasschnelli commented at 4:52 pm on April 9, 2018: contributor

    Right now, there is no log entry when a rescan starts which is confusing especially when a “still rescanning” log entry appears after the log-update timeout of 60s or when user manually aborts the rescan.

    This PR adds a log entry when a rescan starts.

  2. Logprint the start of a rescan cab0824c96
  3. jonasschnelli added the label Wallet on Apr 9, 2018
  4. ryanofsky commented at 4:55 pm on April 9, 2018: member
    utACK cab0824c96e2433a29d5e730f0e888a0a00f9eb3
  5. practicalswift commented at 8:52 pm on April 9, 2018: contributor
    utACK cab0824c96e2433a29d5e730f0e888a0a00f9eb3
  6. MarcoFalke renamed this:
    [Trivial] Logprint the start of a rescan
    wallet: Logprint the start of a rescan
    on Apr 9, 2018
  7. MarcoFalke commented at 11:17 pm on April 9, 2018: member

    I think you can now remove the line from CWallet::CreateWalletFromFile:

    0LogPrintf("Rescanning last %i blocks (from block %i)...\n", chainActive.Height() - pindexRescan->nHeight, pindexRescan->nHeight);
    
  8. in src/wallet/wallet.cpp:1718 in cab0824c96
    1713@@ -1714,6 +1714,9 @@ CBlockIndex* CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, CBlock
    1714 
    1715     CBlockIndex* pindex = pindexStart;
    1716     CBlockIndex* ret = nullptr;
    1717+
    1718+    if (pindex) LogPrintf("Rescan started from block %d...\n", pindex->nHeight);
    


    laanwj commented at 11:47 am on April 10, 2018:
    If !pindex, doesn’t that mean Rescan started from block 0...?

    promag commented at 11:39 pm on April 10, 2018:
    No, if !pindex the loop below won’t run.

    promag commented at 11:39 pm on April 10, 2018:
    Nit, could use pindexStart instead so it’s more obvious?

    laanwj commented at 6:43 am on April 11, 2018:
    Nah it’s fine, I was just confused then, it looked a bit strange to conditionally log this message.

    jonasschnelli commented at 6:48 am on April 11, 2018:
    Indeed. I just want to prevent a nullptr access in case of stupid future changes (not possible now).

    Empact commented at 8:13 am on April 11, 2018:
    Nit: I’d be down for an early return based on pIndexStart being null, given in that case all else is irrelevant.

    laanwj commented at 2:20 pm on April 11, 2018:
    @empact Right that seems like a clear solution, though we can do that later, this has enough utACKs I’m going to merge now.
  9. promag commented at 11:40 pm on April 10, 2018: member
    utACK cab0824.
  10. kallewoof commented at 9:08 am on April 11, 2018: member
    utACK cab0824c96e2433a29d5e730f0e888a0a00f9eb3
  11. laanwj merged this on Apr 11, 2018
  12. laanwj closed this on Apr 11, 2018

  13. laanwj referenced this in commit 6d3de17a22 on Apr 11, 2018
  14. PastaPastaPasta referenced this in commit 0d22818d93 on Jun 10, 2020
  15. PastaPastaPasta referenced this in commit 5a4add2328 on Jun 10, 2020
  16. PastaPastaPasta referenced this in commit 16a5a4bde2 on Jun 10, 2020
  17. PastaPastaPasta referenced this in commit caf0ff73d3 on Jun 11, 2020
  18. PastaPastaPasta referenced this in commit fe6c66c1de on Jun 11, 2020
  19. PastaPastaPasta referenced this in commit 8a6d86e028 on Jun 11, 2020
  20. PastaPastaPasta referenced this in commit 848f60b626 on Jun 12, 2020
  21. 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: 2024-07-03 13:13 UTC

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