<p>Yes. You must call <code>clearTransactions(0)</code> on the Wallet, followed by <code>downloadBlockChain()</code> on the PeerGroup.</p>

<p>BitcoinJ is a thin client, meaning it doesn't download transactions for addresses that aren't in its wallet.</p>

<p><a href="https://bitcoinj.github.io/working-with-the-wallet#replaying-the-chain" rel="nofollow">https://bitcoinj.github.io/working-with-the-wallet#replaying-the-chain</a></p>

CC BY-SA 3.0
2015-01-02T20:41:11.727Z
2015-01-02T20:41:11.727Z
Nick ODell
<p>I added a Wallet instance to PeerGroup instance and executed downloadBlockChain() method. Now if I add a key(s) to that wallet, do I have to execute downloadBlockChain() again to get a current balance including a new key or will it show a right balance automatically, assuming the new key has some balance?</p>

<bitcoinj>
In BitcoinJ, do I need to run downloadBlockChain() again after adding a new key?
alex3181
# In BitcoinJ, do I need to run downloadBlockChain() again after adding a new key?

(Asked by: username_0 on 2015-01-02)

I added a Wallet instance to PeerGroup instance and executed downloadBlockChain() method. Now if I add a key(s) to that wallet, do I have to execute downloadBlockChain() again to get a current balance including a new key or will it show a right balance automatically, assuming the new key has some balance?

**Tags:** bitcoinj


---

## 1 answers

### Answer by username_1 on 2015-01-02. Score: 1

Yes. You must call `clearTransactions(0)` on the Wallet, followed by `downloadBlockChain()` on the PeerGroup.

BitcoinJ is a thin client, meaning it doesn't download transactions for addresses that aren't in its wallet.

<https://bitcoinj.github.io/working-with-the-wallet#replaying-the-chain>


---

