bitcoinj/bitcoinj — pull request #239 by oscarguindzberg (2014-10-09 17:14:58+00:00)
Title: PeerGroup: add/remove wallets to/from connected peers

Description of the problem:
I have an environment where I use multiple wallets. Bitcoinj is started, peers connected. Then I add a wallet by calling peerGroup.addWallet(wallet). Connected peers' wallet lists are not updated, and when I receive a transaction for the new wallet, wallet balance not updated.

Solution:
Add/Remove wallets to the connected peers as they are added/removed to/from the PeerGroup

Current workaround:
```java
peerGroup.addWallet(wallet);
for (Peer peer : peerGroup.getConnectedPeers()) {
peer.addWallet(wallet);
}
```