@Test public void receiveCoins() throws Exception { Transaction tx1 = createFakeTx(unitTestParams, Utils.toNanoCoins(1, 0), wallet.getKeys().get(0).toAddress(unitTestParams)); Block b1 = createFakeBlock(blockStore, tx1).block; chain.add(b1); assertTrue(wallet.getBalance().signum() > 0); }
@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);  }