BlockImporter: init chain with ternary operator

This commit is contained in:
Sean Gilligan 2023-08-12 12:30:39 -07:00 committed by Andreas Schildbach
parent 7f5fc6f2b7
commit b792354f55

View file

@ -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());