bitcoinj/bitcoinj — pull request #163 by ollekullberg (2014-08-07 16:14:38+00:00)
Title: Separate extension initialization into two steps.

Hi.

I work with Martin Zachrison at Strawpay, and I am currently trying to enable payment channels in MultiBitHD. I will send Mike a mail abt this too.

We need to separate extension initialization into two steps: deserializeWalletExtension() and startWalletExtension().

* deserializeWalletExtension() is responsible for interpreting the extension's serialized form into objects.

* startWalletExtension() will perform initialization using the bitcoin network (i.e. the peer group)

Motivation:
Some wallets (MultiBitHD) do not use WalletAppKit, and begin with reading the wallet before initializing the bitcoin network.
This makes it very hard for the old payment channel impl, since deserializeWalletExtension() needed the peer group to run.
But with this change these wallets can call deserializeWalletExtension() when the wallet file is read, and call startWalletExtension() after the bitcoin network is up.