Refactor raft_recv_appendentries() (#148)
Refactored raft_recv_appendentries() just to simplify the flow. This PR should not introduce any behavioral change. Only exception is previously, some tests were manually creating an append request with prev_log_idx:0 and prev_log_term:1. This is not possible and it cannot happen without manually creating append requests. Term of the entry at index 0 cannot be 1. (it is zero by definition). Fixed these tests as part of this PR.
Please register or sign in to comment