Fixes include adding an election ref value, to sync with cands.
This value is kept when the leader enters the safe loop.
Also, an 'assert_leader' message is introduced, to ensure that
candidates are kicked out of the safe loop when a leader acquires
a new lock and remains the leader.
Also, a locks_agent:async_await_all_locks/1 function was added
to ensure that the leader gets told that it has all locks in a
contested scenario.
Ref. https://github.com/ten0s/locks-test (see issue #30 )
Fixes include adding an election ref value, to sync with cands. This value is kept when the leader enters the safe loop. Also, an 'assert_leader' message is introduced, to ensure that candidates are kicked out of the safe loop when a leader acquires a new lock and remains the leader.
Also, a locks_agent:async_await_all_locks/1 function was added to ensure that the leader gets told that it has all locks in a contested scenario.