Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: yamit.ct on April 07, 2021, 09:36:30 AM



Title: Is a Bitcoin node is rescanning a specific wallet?
Post by: yamit.ct on April 07, 2021, 09:36:30 AM
Is there a way to know whether a Bitcoin node is currently rescanning a specific wallet?
Thanks in advance!


Title: Re: Is a Bitcoin node is rescanning a specific wallet?
Post by: yamit.ct on April 07, 2021, 11:28:06 AM
Thanks a lot for your response!
I indeed talk about the Bitcoin Core.
I'm actually looking for a way to do it by the code, i.e. by the API of Bitcoin Core.
Do you know an API function that can fit?


Title: Re: Is a Bitcoin node is rescanning a specific wallet?
Post by: HCP on April 07, 2021, 06:39:52 PM
Thanks a lot for your response!
I indeed talk about the Bitcoin Core.
I'm actually looking for a way to do it by the code, i.e. by the API of Bitcoin Core.
Do you know an API function that can fit?
Yes... use the getwalletinfo command... in the JSON return, there is a "scanning" value that is set to either false or contains the details of the scan progress:

Quote from: help getwalletinfo
...
"scanning" : {                          (json object) current scanning details, or false if no scan is in progress
    "duration" : n,                       (numeric) elapsed seconds since scan start
    "progress" : n                        (numeric) scanning progress percentage [0.0, 1.0]
  },
...


Title: Re: Is a Bitcoin node is rescanning a specific wallet?
Post by: yamit.ct on April 08, 2021, 05:54:46 PM
Thank you! I really appreciate your help!