@Test public void unconnectedBlocks() throws Exception { Block b1 = unitTestParams.getGenesisBlock().createNextBlock(coinbaseTo); Block b2 = b1.createNextBlock(coinbaseTo); Block b3 = b2.createNextBlock(coinbaseTo); assertTrue(chain.add(b1)); assertFalse(chain.add(b3)); assertEquals(chain.getChainHead().getHeader(), b1.cloneAsHeader()); assertTrue(chain.add(b2)); assertEquals(chain.getChainHead().getHeader(), b3.cloneAsHeader()); }
@Override public boolean add(FilteredBlock block) throws VerificationException, PrunedException { boolean success = super.add(block); if (success) { trackFilteredTransactions(block.getTransactionCount()); } return success; }
BlockChain extends AbstractBlockChain { @Override public boolean add(FilteredBlock block) throws VerificationException, PrunedException { boolean success = super.add(block); if (success) { trackFilteredTransactions(block.getTransactionCount()); } return success; } }
BlockChain extends AbstractBlockChain { @Override public boolean add(FilteredBlock block) throws VerificationException, PrunedException { boolean success = super.add(block); if (success) { trackFilteredTransactions(block.getTransactionCount()); } return success; } BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore);  BlockChain(NetworkParameters params, BlockStore blockStore);  BlockChain(NetworkParameters params, List<BlockChainListener> wallets,
                      BlockStore blockStore); }
BlockChain extends AbstractBlockChain { @Override public boolean add(FilteredBlock block) throws VerificationException, PrunedException { boolean success = super.add(block); if (success) { trackFilteredTransactions(block.getTransactionCount()); } return success; } BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore);  BlockChain(NetworkParameters params, BlockStore blockStore);  BlockChain(NetworkParameters params, List<BlockChainListener> wallets,
                      BlockStore blockStore); @Override boolean add(FilteredBlock block); }
BlockChain extends AbstractBlockChain { @Override public boolean add(FilteredBlock block) throws VerificationException, PrunedException { boolean success = super.add(block); if (success) { trackFilteredTransactions(block.getTransactionCount()); } return success; } BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore);  BlockChain(NetworkParameters params, BlockStore blockStore);  BlockChain(NetworkParameters params, List<BlockChainListener> wallets,
                      BlockStore blockStore); @Override boolean add(FilteredBlock block);  }