On low difficulty same block gets saved multiple times in the db which triggers payment problems
### Description

When debugging on new blockchains with low difficulty, there can be cases where a block is submitted multiple times in the db. This will render on payment to pay more than the pool address has in it's account.

### Steps to Reproduce

1. Low diff blockchain
2. Use a powerful miner

### Expected behavior

Only use distinct blocks on calculating rewards.

### Actual behavior

explained in description

### Reproduces how often

5-10%

### Additional Information

Possible fix: add DISTINCT ON(blockheight) in SQL queries used to get the blocks
