@Test public void receiveCoins() throws Exception { int height = 1; Transaction tx1 = createFakeTx(UNITTEST, COIN, LegacyAddress.fromKey(UNITTEST, wallet.currentReceiveKey())); Block b1 = createFakeBlock(blockStore, height, 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(Context context, Wallet wallet, BlockStore blockStore);  BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore);  BlockChain(Context context, BlockStore blockStore);  BlockChain(NetworkParameters params, BlockStore blockStore);  BlockChain(Context params, List<? extends Wallet> wallets, BlockStore blockStore);  BlockChain(NetworkParameters params, List<? extends Wallet> 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(Context context, Wallet wallet, BlockStore blockStore);  BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore);  BlockChain(Context context, BlockStore blockStore);  BlockChain(NetworkParameters params, BlockStore blockStore);  BlockChain(Context params, List<? extends Wallet> wallets, BlockStore blockStore);  BlockChain(NetworkParameters params, List<? extends Wallet> 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(Context context, Wallet wallet, BlockStore blockStore);  BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore);  BlockChain(Context context, BlockStore blockStore);  BlockChain(NetworkParameters params, BlockStore blockStore);  BlockChain(Context params, List<? extends Wallet> wallets, BlockStore blockStore);  BlockChain(NetworkParameters params, List<? extends Wallet> wallets, BlockStore blockStore); @Override boolean add(FilteredBlock block);  }