Fix timestamp parser in new load_stats_file.
commit5dd6304f36a9cb9b7f778abe5b84cf6a4e9890a6
authorKarsten Loesing <karsten.loesing@gmx.net>
Wed, 16 Dec 2020 08:58:19 +0000 (16 09:58 +0100)
committerNick Mathewson <nickm@torproject.org>
Mon, 21 Dec 2020 18:18:20 +0000 (21 13:18 -0500)
tree8466c3e6f5d9a174bdd3fe7297ecea67e6d3fb03
parentc934fced31a2dd6d53b129b6270109bc48c1ebb0
Fix timestamp parser in new load_stats_file.

The previous parser only considered stats files _starting_ with the
timestamp tag, not stats files having the timestamp tag in a later
position. While this applies to all current stats files, a future
stats file might look differently. Better to fix the function now than
be surprised in another 9 years from now.

This commit also adds a test case for such future stats, and it fixes
stats file paths in newly added unit tests.
src/feature/relay/router.c
src/test/test_stats.c