Skip to content
Snippets Groups Projects
Closed (moved) Allow the new sched to respond to a new conensus, not the old one.
  • View options
  • Allow the new sched to respond to a new conensus, not the old one.

  • View options
  • Closed (moved) Issue created by pastly

    If the sched hears about a new consensus, we should switch schedulers first. Then tell the scheduler implementation about the new consensus. It doesn't make sense to have the old one respond to the new consensus right before we stop using it.

    @@ -371,12 +369,13 @@ void
     scheduler_notify_networkstatus_changed(const networkstatus_t *old_c,
                                            const networkstatus_t *new_c)
     {
    +  /* Maybe the consensus param made us change the scheduler. */
    +  set_scheduler();
    +
       /* Then tell the (possibly new) scheduler that we have a new consensus */
       if (the_scheduler->on_new_consensus) {
         the_scheduler->on_new_consensus(old_c, new_c);
       }
    -  /* Maybe the consensus param made us change the scheduler. */
    -  set_scheduler();
     }
     
     /*

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading