Index: src/com/google/bitcoin/core/BlockChain.java
===================================================================
--- src/com/google/bitcoin/core/BlockChain.java (revision 40)
+++ src/com/google/bitcoin/core/BlockChain.java (working copy)
@@ -68,8 +68,11 @@
private final ArrayList<Block> unconnectedBlocks = new ArrayList<Block>();
public BlockChain(NetworkParameters params, Wallet wallet) {
- // TODO: Let the user pass in a BlockStore object so they can choose
how to store the headers.
- blockStore = new MemoryBlockStore();
+ this(params, wallet, new MemoryBlockStore());
+ }
+
+ public BlockChain(NetworkParameters params, Wallet wallet, final
BlockStore blockStore) {
+ this.blockStore = blockStore;
try {
// Set up the genesis block. When we start out fresh, it is by definition the top of the chain.
Block genesisHeader = params.genesisBlock.cloneAsHeader();
Original issue reported on code.google.com by andreas....@gmail.com on 26 Mar 2011 at 12:17
Original issue reported on code.google.com by
andreas....@gmail.com
on 26 Mar 2011 at 12:17