<p>Bitcoin Core currently has no internal function to recover a complete wallet. If the key is unknown (not generated yet), Bitcoin-Core will not detect transaction from to to that key/address. Also, the keypool size does not matter at this point, funds sent to a keypool key/address are not detected at the moment.</p>

<p>For now (Bitcoin Core &lt;= 0.14.0), if you restore a backup, make sure you generate plenty of addresses, loop through getnewaddress and ensure you generate 1000 (or more?) keys.</p>

<p>After you did this, restart Bitcoin Core (qt/d) with <code>-rescan</code></p>

<p><strong>Hopefully we can add some HD restore features for Core 0.15.</strong></p>

CC BY-SA 3.0
2017-02-12T13:29:31.487Z
2017-02-12T13:29:31.487Z
Jonas Schnelli
<p>I made a transaction from my android wallet to my bitcoin core HD wallet (v0.13.2). At the time of writing, the transaction has 5 confirmations, both according to the android wallet and <a href="https://blockchain.info/tx/174622f3b7e16fb78a156a423065254d76d7360b65eb2b628d4c5dc5239340fe" rel="nofollow noreferrer">blockchain.info</a>. However, <strong>my bitcoin core wallet fails to pick up the transaction</strong>, despite showing the right blockchain height.</p>

<p>The recipient address was generated by <code>bitcoin-qt</code>, hence it does belong to my HD wallet. Furthemore, I am able to sign a message with this address on <code>bitcoin-qt</code> (indicating I own the private key) and successfully verify the signature. In fact, in the course of my investigation, I had the unpleasant surprise of realizing that <strong>this address had already been generated in the past and I had already sent bitcoin to it</strong> as can be seen <a href="https://blockchain.info/address/13DtaPFifCU7LobzTnn9FJGozsCNDP7sXm" rel="nofollow noreferrer">here</a>. (This seems related to the issue reported <a href="https://bitcoin.stackexchange.com/questions/48502/bitcoin-core-restored-hd-wallet-reusing-payment-address">in this post</a> but is no longer the most pressing matter now). The older transaction using this address is part of my <code>bitcoin-qt</code> transaction log. So <strong>there can be no doubt the recipient address does belong to my bitcoin core HD wallet</strong>.</p>

<p>I am reluctant to attempt replicating the issue I have just described with another trial transaction. However, as this is probably relevant, I will explain what I did prior to this happening: 1. I made a copy of <code>wallet.dat</code> and removed the file from <code>~/.bitcoin</code> (so running <code>bitcoind</code> or <code>bitcoin-qt</code> would automatically generate a new empty<code>wallet.dat</code>). 2. prior to the transaction I restored my copy of <code>wallet.dat</code> into <code>~/.bitcoin</code> and started <code>bitcoin-qt</code>. 3. I asked <code>bitcoin-qt</code> for a new address and had my android wallet carry out the transaction. 4. I then shredded and removed <code>wallet.dat</code> and restarted <code>bitcoind</code> for a while. 5. When seeing the transaction had been confirmed, I re-instated my copy of <code>wallet.dat</code> into <code>~/.bitcoin</code> with the intention of performing another transaction. 6. I then re-started <code>bitcoin-qt</code> which fails to pick up the latest transaction. </p>

<p>Note that this process of mine of shredding <code>wallet.dat</code> from <code>~/.bitcoin</code> (while a copy of the file exists in a more secure location) is something I have just decided to do, as a way of making it harder for any potential hacker to spend the coins on this wallet. </p>

<p><strong>So my bitcoin core wallet is obviously confused. Is there anything I can do to set it straight?</strong>  </p>

<p><strong>EDIT:</strong> When I re-instated my <code>wallet.dat</code>into <code>~/.bitcoin</code> I am guessing a re-scan was not triggered for some reason. I shredded again my current <code>wallet.dat</code> and re-instated my (older) backup: this time a re-scan was triggered and the missing transaction was picked up. </p>

<p>So <strong>this issue is resolved</strong> as far as I can see it (albeit with the unease of not knowing why).</p>

<bitcoin-core><wallet>
Bitcoin Core HD Wallet v0.13.2 missing confirmed incoming transaction
Sven Williamson
# Bitcoin Core HD Wallet v0.13.2 missing confirmed incoming transaction

(Asked by: username_0 on 2017-02-11)

I made a transaction from my android wallet to my bitcoin core HD wallet (v0.13.2). At the time of writing, the transaction has 5 confirmations, both according to the android wallet and [blockchain.info](https://blockchain.info/tx/174622f3b7e16fb78a156a423065254d76d7360b65eb2b628d4c5dc5239340fe). However, **my bitcoin core wallet fails to pick up the transaction**, despite showing the right blockchain height.

The recipient address was generated by `bitcoin-qt`, hence it does belong to my HD wallet. Furthemore, I am able to sign a message with this address on `bitcoin-qt` (indicating I own the private key) and successfully verify the signature. In fact, in the course of my investigation, I had the unpleasant surprise of realizing that **this address had already been generated in the past and I had already sent bitcoin to it** as can be seen [here](https://blockchain.info/address/13DtaPFifCU7LobzTnn9FJGozsCNDP7sXm). (This seems related to the issue reported [in this post](https://bitcoin.stackexchange.com/questions/48502/bitcoin-core-restored-hd-wallet-reusing-payment-address) but is no longer the most pressing matter now). The older transaction using this address is part of my `bitcoin-qt` transaction log. So **there can be no doubt the recipient address does belong to my bitcoin core HD wallet**.

I am reluctant to attempt replicating the issue I have just described with another trial transaction. However, as this is probably relevant, I will explain what I did prior to this happening: 1. I made a copy of `wallet.dat` and removed the file from `~/.bitcoin` (so running `bitcoind` or `bitcoin-qt` would automatically generate a new empty`wallet.dat`). 2. prior to the transaction I restored my copy of `wallet.dat` into `~/.bitcoin` and started `bitcoin-qt`. 3. I asked `bitcoin-qt` for a new address and had my android wallet carry out the transaction. 4. I then shredded and removed `wallet.dat` and restarted `bitcoind` for a while. 5. When seeing the transaction had been confirmed, I re-instated my copy of `wallet.dat` into `~/.bitcoin` with the intention of performing another transaction. 6. I then re-started `bitcoin-qt` which fails to pick up the latest transaction.

Note that this process of mine of shredding `wallet.dat` from `~/.bitcoin` (while a copy of the file exists in a more secure location) is something I have just decided to do, as a way of making it harder for any potential hacker to spend the coins on this wallet.

**So my bitcoin core wallet is obviously confused. Is there anything I can do to set it straight?**

**EDIT:** When I re-instated my `wallet.dat`into `~/.bitcoin` I am guessing a re-scan was not triggered for some reason. I shredded again my current `wallet.dat` and re-instated my (older) backup: this time a re-scan was triggered and the missing transaction was picked up.

So **this issue is resolved** as far as I can see it (albeit with the unease of not knowing why).

**Tags:** bitcoin-core, wallet


---

## 1 answers

### Answer by username_1 on 2017-02-12. Score: 2 | Accepted answer

Bitcoin Core currently has no internal function to recover a complete wallet. If the key is unknown (not generated yet), Bitcoin-Core will not detect transaction from to to that key/address. Also, the keypool size does not matter at this point, funds sent to a keypool key/address are not detected at the moment.

For now (Bitcoin Core <= 0.14.0), if you restore a backup, make sure you generate plenty of addresses, loop through getnewaddress and ensure you generate 1000 (or more?) keys.

After you did this, restart Bitcoin Core (qt/d) with `-rescan`

**Hopefully we can add some HD restore features for Core 0.15.**


---

