class TransactionsPool {

    public void addBlock(Block block) {
        Util.check(block != null, "block != null");

        if (BlockUtil.isEmptyBlock(block)) {
            return;
        }

        Object dummyObject = new Object();

        synchronized (locker) {
            Collection<String> hashes = BlockUtil.getTransactionsHashesAsString(block);

            for (String hash : hashes) {
                lastTransactions.put(hash, dummyObject);
            }

            transactions.removeAll(hashes);
        }
    }

}