• Shaya Potter's avatar
    match up raft_get_last_log_term() to should_grant_vote() (#14) · fab583d6
    Shaya Potter authored
    raft_get_last_log_term() is used for filling in vote requests, except it didn't match 100% with the logic in should_grant_vote
    
    * update test to prove that change works as needed
    
    previous test tested when we don't snapshot everything, but code was broken when we did.
    modified test tested only when we snapshot everything, now we do both in sequence.
    
    * use raft_get_last_log_term in __should_grant_vote()
    
    also modify __should_grant_vote to take a raft_server_t instead of raft_server_privat_t so its not constantly casting it to void.
    fab583d6
test_snapshotting.c 21.8 KB