Variable "Sum" should be of type uint64_t and not uint32_t since addition of multipe uint32_t (History) will untedetcedly overflow.
Variable "Sum" should be of type uint64_t and not uint32_t since addition of multipe uint32_t (History) will untedetcedly overflow.