Sped up implementation of getReceipts, which is not only much faster than the old implementation, but also returns a limited amount of receipts, to prevent memory problems.
getReceipts