Previously we had only two kinds of errors that the State
implementations could return: fatal and nonfatal. The fatal ones aborted the bootstrapping process, whereas the nonfatal ones were ignored.
That's not so great, for two reasons:
The motivating examples here are issue #438 (closed), #439 (closed), and #440: for all of them, we need a way to say, in the certificate-downloading stage, that the consensus that we're trying to validate was no good and we need to get a new one.
This branch addresses these issues with two main design changes:
State
can now report a "blocking error" that means that the bootstrapping process needs to reset.State::add_from_{cache,download}
functions can now report nonfatal errors.There are also several specific places that needed changing to get the right behavior here, and tamp down a few other errors I found along the way.
Closes #439 (closed).
Part of #329 (closed).
Assigning review to @eta since she's stared into this particular abyss in the past.