tor-hscrypto: Return 0 if the timestamp is before the start of the TP.

#1155 (closed) was happening because we couldn't compute the offset of the current time from the start of the next TP (TimePeriod::offset_within_period expected when to come after the start of the TP). TimePeriod::offset_within_period now returns an offset of 0 for timestamps that come before the start of the TP, to support computing revision counters for the descriptors uploaded to the HsDirs from the ring associated with the next TP.

Fixes #1155 (closed)

Merge request reports

Loading