- Check the blockchain every 3 seconds
- However many blocks have been generated in that time, divide the payout by that
- If txfee is less than 0.00000001, set it to 0.00000001
- current txfee is 0.00010000. So if 10 blocks are generated in 3 seconds, the payout will be 0.00001000
Can't happen. It will only run the reward part of the script if 1 or more blocks has been generated.
If no new blocks have been generated, it will wait another 3 seconds until one is.
Nahh there's still something wrong, they all have 0.0001 fees, and some blocks still have multiples. Somehow you're sending tx's too often, or there would be more blocks with 0 of your reward tx's.