write to log file when rescanning is finished #14354

pull robust-cuttlefish wants to merge 1 commits into bitcoin:master from robust-cuttlefish:patch-1 changing 1 files +1 −0
  1. robust-cuttlefish commented at 11:40 PM on September 29, 2018: none

    I need it to add bitcoind backend to electrum. Grepping the source, I couldn't find an RPC call to find rescan status to find when rescanning is done. Logging it would be perfect, and only needs 1 line of code.

  2. logs when rescan is finished d4b470fbdb
  3. fanquake added the label Utils/log/libs on Sep 30, 2018
  4. sipa commented at 8:04 AM on September 30, 2018: member

    Please update the PR description.

  5. robust-cuttlefish renamed this:
    logs when rescan is finished
    write to log file when rescanning is finished
    on Sep 30, 2018
  6. robust-cuttlefish commented at 8:13 AM on September 30, 2018: none

    Sorry Pieter, I'm somewhat new to Github and I'm not sure exactly what you meant, but I tried to update the description. Not sure I did it right.

  7. in src/wallet/rpcdump.cpp:1186 in d4b470fbdb
    1182 | @@ -1183,6 +1183,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
    1183 |              nLowestTimestamp = chainActive.Tip()->GetBlockTime();
    1184 |          } else {
    1185 |              fRescan = false;
    1186 | +            LogPrintf("Rescan completed\n");
    


    promag commented at 8:20 PM on September 30, 2018:

    This is wrong. No rescan took place yet.


    robust-cuttlefish commented at 9:17 PM on September 30, 2018:

    sorry for wasting your time, I will look where it actually will finish a rescan. ./src/wallet/wallet.cpp, function CBlockIndex looks promising. I was tired.

  8. robust-cuttlefish closed this on Sep 30, 2018

  9. robust-cuttlefish commented at 9:20 PM on September 30, 2018: none

    I regret wasting your and pieter's time. Looking now at ./src/wallet/wallet.cpp function CBlockIndex. I'll open a new PR when I find the correct way to do this.

  10. promag commented at 9:47 PM on September 30, 2018: member

    @robust-cuttlefish no problem.

    If you are calling importmulti then you know rescan is finished when you get the response.

  11. robust-cuttlefish commented at 9:50 PM on September 30, 2018: none

    awesome. that's perfect. many thanks.

  12. DrahtBot 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-13 15:15 UTC

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