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?


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.


| improve this answer | |

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.