The bug was that we considered "\nr" as the beginning of a status entry.
However, there are crypto lines starting with "r", so we need to look for
"\nr ". Now there are crypto lines starting with "r" in the unit tests.
Doesn't fix the problem, but helps discover it in the future. Fix comes
next.
The problem is that Java's BlockingQueue implementation doesn't support
end-of-stream objects to signal that the producer won't add more objects
to the queue. We need to implement that ourselves, and it turns out it's
harder than expected to get it right. We can just implement our own
thread handling.
This will allow us to parse v3 consensuses, v3 votes, v3 microdesc
consensuses, v2 statuses, and sanitized bridge network statuses without
duplicating too much code. v1 directories are too different, though.
The parser doesn't detect many problems yet. Most of the unit tests check
for the absence of exceptions when they really should test for the
exceptions. This is more like a TODO list for making the parser better.
The functionality implemented so far is sufficient to do the downloading
for the consensus-health checker. It does not, however, implement the
necessary parsing for the consensus-health checker yet.