3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00

Add a constructor that allows wallet-less operation (now possible due to the previous patch to support multiple wallets).

This commit is contained in:
Mike Hearn 2011-07-06 13:42:31 +00:00
parent 062ad32851
commit 10fef0b480

View File

@ -81,7 +81,16 @@ public class BlockChain {
*/
public BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore) {
this(params, new ArrayList<Wallet>(), blockStore);
addWallet(wallet);
if (wallet != null)
addWallet(wallet);
}
/**
* Constructs a BlockChain that has no wallet at all. This is helpful when you don't actually care about sending
* and receiving coins but rather, just want to explore the network data structures.
*/
public BlockChain(NetworkParameters params, BlockStore blockStore) {
this(params, new ArrayList<Wallet>(), blockStore);
}
/**