mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 14:50:57 +01:00
LevelDbFullPrunedBlockStore: Reformat and rename class. It used Windows line endings.
This commit is contained in:
parent
08ab6a0da5
commit
59fa28ec70
3 changed files with 1148 additions and 1215 deletions
File diff suppressed because it is too large
Load diff
|
@ -17,8 +17,7 @@ package org.bitcoinj.core;
|
|||
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
import org.bitcoinj.store.FullPrunedBlockStore;
|
||||
import org.bitcoinj.store.H2FullPrunedBlockStore;
|
||||
import org.bitcoinj.store.LevelDbFullPrunedBlockStore;
|
||||
import org.bitcoinj.store.LevelDBFullPrunedBlockStore;
|
||||
import org.junit.After;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -26,7 +25,7 @@ import java.io.File;
|
|||
/**
|
||||
* An H2 implementation of the FullPrunedBlockStoreTest
|
||||
*/
|
||||
public class LevelDbFullPrunedBlockChainTest extends
|
||||
public class LevelDBFullPrunedBlockChainTest extends
|
||||
AbstractFullPrunedBlockChainTest {
|
||||
@After
|
||||
public void tearDown() throws Exception {
|
||||
|
@ -37,7 +36,7 @@ public class LevelDbFullPrunedBlockChainTest extends
|
|||
public FullPrunedBlockStore createStore(NetworkParameters params,
|
||||
int blockCount) throws BlockStoreException {
|
||||
deleteFiles();
|
||||
return new LevelDbFullPrunedBlockStore(params, "test-leveldb",
|
||||
return new LevelDBFullPrunedBlockStore(params, "test-leveldb",
|
||||
blockCount);
|
||||
}
|
||||
|
||||
|
@ -52,6 +51,6 @@ public class LevelDbFullPrunedBlockChainTest extends
|
|||
@Override
|
||||
public void resetStore(FullPrunedBlockStore store)
|
||||
throws BlockStoreException {
|
||||
((LevelDbFullPrunedBlockStore) store).resetStore();
|
||||
((LevelDBFullPrunedBlockStore) store).resetStore();
|
||||
}
|
||||
}
|
|
@ -20,15 +20,15 @@ import org.bitcoinj.core.FullPrunedBlockChain;
|
|||
import org.bitcoinj.core.PeerGroup;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
import org.bitcoinj.store.FullPrunedBlockStore;
|
||||
import org.bitcoinj.store.LevelDbFullPrunedBlockStore;
|
||||
import org.bitcoinj.store.LevelDBFullPrunedBlockStore;
|
||||
|
||||
public class LevelDb {
|
||||
public class LevelDB {
|
||||
public static void main(String[] args) throws Exception {
|
||||
/*
|
||||
* This is just a test runner that will download blockchain till block
|
||||
* 390000 then exit.
|
||||
*/
|
||||
FullPrunedBlockStore store = new LevelDbFullPrunedBlockStore(
|
||||
FullPrunedBlockStore store = new LevelDBFullPrunedBlockStore(
|
||||
MainNetParams.get(), args[0], 1000, 100 * 1024 * 1024l,
|
||||
10 * 1024 * 1024, 100000, true, 390000);
|
||||
|
||||
|
@ -42,7 +42,5 @@ public class LevelDb {
|
|||
|
||||
vPeerGroup.start();
|
||||
vPeerGroup.downloadBlockChain();
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue