What are the implications and reasons behind this warning on gui popup, when closing the wallet:

"bitcoin closing the wallet for too long can result in having to resync the entire chain if pruning is enabled"

A pruned node will always catch up, whats the hassle?


A pruned node will always catch up, whats the hassle?

The issue stems from having Bitcoin Core opened but the wallet in question is not loaded in Bitcoin Core (because you closed it). Bitcoin Core will continue to be synced and receive new blocks and transactions. However, it will discard old blocks once it has stored the configured amount of block data.

Suppose, for example, your pruned node is synced to block 570000 and is configured to keep 1000 blocks of data. When you do Close Wallet at block 570000, your wallet is synced to block 570000. But Bitcoin Core is still running and receiving new blocks and transactions. 1000 blocks later, at block 571000, block 570000 is discarded. One block later, block 570001 is discarded.

Now if you try to load your wallet again, it is going to try to catch up to the latest block, so it looks for block 570001 to begin rescanning. However your node has already discarded the block, and thus the rescan is unable to continue. In order to get block 570001 to scan it, you will need to redownload the entire blockchain. This is what the warning is for.

During the entire time your wallet was closed, Bitcoin Core was still running. However your wallet was not loaded into it, so it does not know to scan for transactions that belong to that wallet, and even if it did, it wouldn't know where to put the transactions it finds. So it is always catching up, but without the wallet in question loaded, it isn't finding the transactions that you care about.

  • so as long as i keep the same wallet open nothing is missed and all ok? – qrtLs Jun 14 at 19:46
  • Yes. With pruning enabled, you shouldn't really be dynamically loading and unloading wallets. – Andrew Chow Jun 14 at 20:21

If you have a wallet that isn’t opened for the period of pruning, it won’t be able to scan transactions. If you set the limit to 2GB, and 4GB of blocks pass without opening the wallet, it may miss incoming transactions as the required blocks will have been deleted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.