Improved checking loop so only iterate until the max pattern history size is reached (otherwise will always iterate to MAX_TRANSACTIONS)
Merge pull request #1 from andre-takenet/master

Checking loop optimization