3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +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,9 +81,18 @@ public class BlockChain {
*/
public BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore) {
this(params, new ArrayList<Wallet>(), blockStore);
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);
}
/**
* Constructs a BlockChain connected to the given list of wallets and a store.
*/