@Override
    public boolean add(FilteredBlock block) throws VerificationException, PrunedException {
        boolean success = super.add(block);
        if (success) {
            trackFilteredTransactions(block.getTransactionCount());
        }
        return success;
    }
@Test
    public void intraBlockDependencies() throws Exception {
        Context.propagate(new Context(100, Coin.ZERO, false, true));
        // Covers issue 166 in which transactions that depend on each other inside a block were not always being
        // considered relevant.
        Address somebodyElse = new ECKey().toAddress(ScriptType.P2PKH, BitcoinNetwork.TESTNET);
        Block b1 = TESTNET.getGenesisBlock().createNextBlock(somebodyElse);
        ECKey key = testNetWallet.freshReceiveKey();
        Address addr = key.toAddress(ScriptType.P2PKH, BitcoinNetwork.TESTNET);
        // Create a tx that gives us some coins, and another that spends it to someone else in the same block.
        Transaction t1 = FakeTxBuilder.createFakeTx(TESTNET.network(), COIN, addr);
        Transaction t2 = new Transaction();
        t2.addInput(t1.getOutput(0));
        t2.addOutput(valueOf(2, 0), somebodyElse);
        b1.addTransaction(t1);
        b1.addTransaction(t2);
        b1.solve();
        testNetChain.add(b1);
        assertEquals(Coin.ZERO, testNetWallet.getBalance());
    }