Use publish-subscribe system in more places
Some likely code that we could replace includes:
-
directory_info_has_arrived
-
note_that_we_have_completed_a_circuit
-
note_that_we_maybe_cant_complete_circuits
-
circuit_has_opened()
-
All "we got a new consensus" events:
- notify_before_networkstatus_changes
- notify_after_networkstatus_changes
-
clock jump events:
- circuit_note_clock_jumped
- netstatus_note_clock_jumped
There are probably more!
As we do these, we should open subtickets, and not try to do them all as a part of this ticket.