larryhastings / drafty

MIT License
0 stars 0 forks source link

Add a Command to force an election #1

Open ericvsmith opened 1 year ago

ericvsmith commented 1 year ago

For a Follower, go to Candidate state. For a Leader, go to Follower state.

Or can a Leader go directly to Candidate? I suppose it couldn't hurt, but I'll have to think about it.

ericvsmith commented 1 year ago

I added "next_state", which optionally takes the name of a state to advance to ("follower", "candidate", "leader").

But it's doing odd things, like causing oscillations between follower and candidate states. I'm going to leave this open until I figure it out.