Questions about wallet restoration and missing addresses

8 replies 482 views
wildnonceMember
Posts: 4 · Reputation: 207
#1Mar 9, 2020, 02:33 AM
Hey guys, I need some clarity on restoring a wallet in a node. I had a single wallet with like 30 addresses, restored it using "importprvkey" and now I only see the main address. I tried sending a transaction to an old address, but my node says it can’t retrieve anything from it. How do I get back all my addresses?
2 Reply Quote Share
dan.yieldNewbie
Posts: 9 · Reputation: 39
#2Mar 9, 2020, 04:14 AM
When you import a private key, it usually only brings back coins tied to that key. So, did you actually import all 30 private keys? You should really use the recovery seeds or seed phrase to get back the whole wallet.
5 Reply Quote Share
wildnonceMember
Posts: 4 · Reputation: 207
#3Mar 9, 2020, 10:06 AM
Thanks for the reply! The addresses were all part of the same wallet. I thought restoring it would restore every address, since it’s just one wallet file, right? "dumpprvkey" only gives one private key per address, so no way to restore them all separately.
4 Reply Quote Share
dan.yieldNewbie
Posts: 9 · Reputation: 39
#4Mar 9, 2020, 12:21 PM
Yeah, "dumpprvkey" gives you the private key for just that address in Qt. I don’t think you can get seeds from a Qt wallet either. You could recover using the wallet.dat file or importing private keys for each address. Correct me if I'm wrong.
4 Reply Quote Share
wildnonceMember
Posts: 4 · Reputation: 207
#5Mar 9, 2020, 02:43 PM
What’s ‘Qt’ mean?
1 Reply Quote Share
mr_orbitMember
Posts: 23 · Reputation: 145
#6Mar 9, 2020, 03:14 PM
What’s your Bitcoin Core version? You might want to try using the "rescan" command after imports. It tells Bitcoin Core to scan the blockchain for your imported key. This can take time but should list all addresses related to it. Remember that importing HD wallets with "importprvkey" might miss some addresses.
4 Reply Quote Share
wildnonceMember
Posts: 4 · Reputation: 207
#7Mar 9, 2020, 09:22 PM
Hey, I tried the -rescan option, but it seems to be gone since v21. I heard it’s supposed to be automatic now? The problem is I still can’t see all my addresses. Do I need to backup the "*.dat" file every time I generate an address?
2 Reply Quote Share
mr_orbitMember
Posts: 23 · Reputation: 145
#8Mar 9, 2020, 10:55 PM
Yeah, in those newer versions rescanning should happen automatically. You can still do it manually using "rescanblockchain", and you can set block heights. But no need to back everything up after each new address HD wallets generate future addresses from the existing seed. Still, regular backups of your wallet.dat are a must.
2 Reply Quote Share
Posts: 185 · Reputation: 37
#9Mar 10, 2020, 03:44 AM
Quick question, what version of Bitcoin Core did you use to create that wallet? And was it an HD wallet? Just FYI, there’s no real "main address" in a Bitcoin Core wallet. You get external addresses for receiving and internal ones for change. So, if you send BTC, it’ll switch excess back to an internal address.
2 Reply Quote Share

Related topics