Updated how statistics get their value from a transaction