mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-22 06:21:47 +01:00
BlockImporter: init chain
with ternary operator
This commit is contained in:
parent
7f5fc6f2b7
commit
b792354f55
1 changed files with 3 additions and 5 deletions
|
@ -60,11 +60,9 @@ public class BlockImporter {
|
|||
return;
|
||||
}
|
||||
|
||||
AbstractBlockChain chain = null;
|
||||
if (store instanceof FullPrunedBlockStore)
|
||||
chain = new FullPrunedBlockChain(params, (FullPrunedBlockStore) store);
|
||||
else
|
||||
chain = new BlockChain(network, store);
|
||||
AbstractBlockChain chain = (store instanceof FullPrunedBlockStore) ?
|
||||
new FullPrunedBlockChain(params, (FullPrunedBlockStore) store) :
|
||||
new BlockChain(network, store);
|
||||
|
||||
BlockFileLoader loader = new BlockFileLoader(network, BlockFileLoader.getReferenceClientBlockFileList());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue