def updateStats(self, s, done, total):
        # Update the sync statistics for a single node.
        if done > 0 and not s.in_done:
            s.in_done = True
            self.stats_done += 1
        elif done < 0 and s.in_done:
            s.in_done = False
            self.stats_done -= 1

        if total > 0 and not s.in_total:
            s.in_total = True
            self.stats_total += 1
        elif total < 0 and s.in_total:
            s.in_total = False
            self.stats_total -= 1