org.bitcoinj.store.LevelDBFullPrunedBlockStore Java Examples
The following examples show how to use
org.bitcoinj.store.LevelDBFullPrunedBlockStore.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LevelDB.java From green_android with GNU General Public License v3.0 | 6 votes |
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( MainNetParams.get(), args[0], 1000, 100 * 1024 * 1024l, 10 * 1024 * 1024, 100000, true, 390000); FullPrunedBlockChain vChain = new FullPrunedBlockChain( MainNetParams.get(), store); vChain.setRunScripts(false); PeerGroup vPeerGroup = new PeerGroup(MainNetParams.get(), vChain); vPeerGroup.setUseLocalhostPeerWhenPossible(true); vPeerGroup.addAddress(InetAddress.getLocalHost()); vPeerGroup.start(); vPeerGroup.downloadBlockChain(); }
Example #2
Source File: LevelDB.java From GreenBits with GNU General Public License v3.0 | 6 votes |
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( MainNetParams.get(), args[0], 1000, 100 * 1024 * 1024l, 10 * 1024 * 1024, 100000, true, 390000); FullPrunedBlockChain vChain = new FullPrunedBlockChain( MainNetParams.get(), store); vChain.setRunScripts(false); PeerGroup vPeerGroup = new PeerGroup(MainNetParams.get(), vChain); vPeerGroup.setUseLocalhostPeerWhenPossible(true); vPeerGroup.addAddress(InetAddress.getLocalHost()); vPeerGroup.start(); vPeerGroup.downloadBlockChain(); }
Example #3
Source File: LevelDBFullPrunedBlockChainTest.java From bcm-android with GNU General Public License v3.0 | 5 votes |
@Override public FullPrunedBlockStore createStore(NetworkParameters params, int blockCount) throws BlockStoreException { deleteFiles(); return new LevelDBFullPrunedBlockStore(params, "test-leveldb", blockCount); }
Example #4
Source File: LevelDBFullPrunedBlockChainTest.java From green_android with GNU General Public License v3.0 | 5 votes |
@Override public FullPrunedBlockStore createStore(NetworkParameters params, int blockCount) throws BlockStoreException { deleteFiles(); return new LevelDBFullPrunedBlockStore(params, "test-leveldb", blockCount); }
Example #5
Source File: LevelDBFullPrunedBlockChainTest.java From GreenBits with GNU General Public License v3.0 | 5 votes |
@Override public FullPrunedBlockStore createStore(NetworkParameters params, int blockCount) throws BlockStoreException { deleteFiles(); return new LevelDBFullPrunedBlockStore(params, "test-leveldb", blockCount); }
Example #6
Source File: LevelDBFullPrunedBlockChainTest.java From bcm-android with GNU General Public License v3.0 | 4 votes |
@Override public void resetStore(FullPrunedBlockStore store) throws BlockStoreException { ((LevelDBFullPrunedBlockStore) store).resetStore(); }
Example #7
Source File: LevelDBFullPrunedBlockChainTest.java From green_android with GNU General Public License v3.0 | 4 votes |
@Override public void resetStore(FullPrunedBlockStore store) throws BlockStoreException { ((LevelDBFullPrunedBlockStore) store).resetStore(); }
Example #8
Source File: LevelDBFullPrunedBlockChainTest.java From GreenBits with GNU General Public License v3.0 | 4 votes |
@Override public void resetStore(FullPrunedBlockStore store) throws BlockStoreException { ((LevelDBFullPrunedBlockStore) store).resetStore(); }