Bitcoin Forum
April 16, 2026, 10:37:39 AM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Rescan each time I close and reopen wallet  (Read 64 times)
takuma sato (OP)
Hero Member
*****
Offline Offline

Activity: 832
Merit: 739


View Profile
April 15, 2026, 03:51:34 AM
Last edit: April 15, 2026, 04:09:38 AM by takuma sato
 #1

I was able to load an old wallet and the transactions are there and everything showed up correctly with labels and so on, the thing is, it spend 14 hours rescanning when I tried to open it. I found out looking at the debug.log file as the GUI just shows a blue loading bar with no progress or any data.

So I closed the wallet, it prompted about how if you close it for too long you may need to rescan, but I only closed it for a moment when I tried to open another wallet. It started rescanning around 0.49% for some reason (the first time it was from 0%). I closed it because I think this other wallet is empty anyway. So I load the other wallet again and it's rescanning at also around 0.49%. I don't get it.

I had all the funds showing up, why is it rescanning again for the same wallet? do I really have to spend another 8 hours waiting for this? This is nonsense. I guess you cannot close any wallets once they load. I thought that once you rescanned once that was enough for all wallets, but if each time you load a wallet you have to spend 14 hours (or 8 if it starts from 0.49% for some reason...) then this isn't very user friendly to say the least.

Edit: I closed Bitcoin and reopened it, then tried to open the wallet which was already working (the one with the funds) and it opened straight away. So looks like it was doing a reescan for the other wallet, and refused to open the wallet which already had it's rescan done.

Are the files on the database folder the files that make it load instantly after the rescan is done? When I did a backup with the "Backup Wallet" menu setting it did not save the database folder inside the wallet's folder, only saved a wallet.dat file, so I manually copied the entire folder including those files instead to back it up.
nc50lc
Legendary
*
Offline Offline

Activity: 3122
Merit: 8629


Self-proclaimed Genius


View Profile
April 15, 2026, 04:25:14 AM
Merited by ABCbits (1), hugeblack (1), hosemary (1)
 #2

Yes, you don't actually have to use the "Close Wallet" menu every time you need to shutdown the node.
Doing so will make it out-of-date to the new blocks while it's unloaded, thus it needs to rescan those blocks that it haven't scanned yet.

But the questions is, why does it takes too long to rescan something that's closed just a few moments ago...
Because it only needs to scan a block or two in that case.
E.g.: In the debug.log, you should see something like this, where it states the starting block, that should continue from the block height when you closed the wallet:
Code:
[WALLET-NAME] Wallet completed loading in              NNms
init message: Rescanning…
[WALLET-NAME] Rescanning last NNN blocks (from block NNNNNN)...

How do you reload the wallet that's been closed? "Open Wallet" or "Restore Wallet"? (the former should be used in this case)
Is the node set in pruned mode with low prune size setting?
What does that 0.49% looks like, a stand-alone progress bar? (a screenshot of that progress bar would be nice)

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Cricktor
Legendary
*
Offline Offline

Activity: 1470
Merit: 3861



View Profile
April 15, 2026, 05:22:53 AM
 #3

Just an additional idea: does OP have txindex=1 and specifically blockfilterindex=1 in his bitcoin.conf config file?

Having a blockfilter index speeds up rescanning with recent versions of Bitcoin Core significantly! I would assume this is also working for Knots (I remember OP mentioned he uses Knots but didn't mention it in this topic).

I have currently 8 concurrent wallets open in my non-pruned Bitcoin Core where some of them are just watch-only ones and a few hot testing wallets with no funds. I don't close them because that's not really necessary for me. All load very quickly, even when two of the watch-only wallets have nearly 22k descriptors each.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!