relays don't ever checkpoint their state file
The calls to or_state_mark_dirty() are:
- When you change your onion key
- Every n client circuits you build
- When you write out bandwidth accounting info (which happens on hup and when you begin hibernation or go dormant)
- When you're exiting
- When you add/remove an entry guard or one of your entry guards changes state
There's no regular checkpoint though. Which means you could go many days without writing it, and for relays now that we've added #1863 (moved) we might want that.
One fix would be to change
global_state->next_write = TIME_MAX;
in or_state_save() to pick something like a day rather than TIME_MAX.