Added a correcntess condition for leader flapping test.
Now also notify whenever a node enters election.