Just some additional explanation of why this discrepancy could occur. Unlike the web dashboard, the earnings.py script tries to display the nodes own information where it can. This is intentional, so it can be used to verify the numbers the node gets back from the satellite. So the calculation of held amount in the month you’re looking at is based on its own book keeping. However, the held amount totals are based on what the satellite reports. They include the total held amount up until the start of the month. Satellite side adjustments as well as payouts that were shifted into a different month would impact when things were paid out or held, but the node isn’t aware of that so its own book keeping is no longer in line. For what it’s worth, the results have been very consistent on both ends in recent months. Nothing more than rounding errors in my experience.
You definitely made me double check and look at the code though. Can’t hurt to make sure I didn’t make a mistake somewhere, but it doesn’t look like it.