Commit 3627f344 authored by Jiale Zhi's avatar Jiale Zhi Committed by Willem
Browse files

Fix typos and extra spaces (#77)

parent 700eebe6
......@@ -291,7 +291,7 @@ typedef int (
* @param[in] raft The Raft server making this callback
* @param[in] user_data User data that is passed from Raft server
* @param[in] term Current term
* @param[in] vote The node value dicating we haven't voted for anybody
* @param[in] vote The node value dictating we haven't voted for anybody
* @return 0 on success */
typedef int (
*func_persist_term_f
......@@ -722,12 +722,12 @@ int raft_node_get_id(raft_node_t* me_);
* @return get state of type raft_state_e. */
int raft_get_state(raft_server_t* me_);
/** The the most recent log's term
/** Get the most recent log's term
* @return the last log term */
int raft_get_last_log_term(raft_server_t* me_);
/** Turn a node into a voting node.
* Voting nodes can take part in elections and in-regards to commiting entries,
* Voting nodes can take part in elections and in-regards to committing entries,
* are counted in majorities. */
void raft_node_set_voting(raft_node_t* node, int voting);
......
......@@ -17,7 +17,7 @@ void log_clear(log_t* me_);
* Add entry to log.
* Don't add entry if we've already added this entry (based off ID)
* Don't add entries with ID=0
* @return 0 if unsucessful; 1 otherwise */
* @return 0 if unsuccessful; 1 otherwise */
int log_append_entry(log_t* me_, raft_entry_t* c);
/**
......
......@@ -542,7 +542,7 @@ static int __should_grant_vote(raft_server_private_t* me, msg_requestvote_t* vr)
if (vr->term < raft_get_current_term((void*)me))
return 0;
/* TODO: if voted for is candiate return 1 (if below checks pass) */
/* TODO: if voted for is candidate return 1 (if below checks pass) */
if (raft_already_voted((void*)me))
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment