Commit e06ff288 authored by Mohamed Alzayat's avatar Mohamed Alzayat
Browse files

variable confusion bug fix -- reported by Rhett (ds-ws18)

parent d54a93e2
......@@ -86,7 +86,7 @@ proposer::setn()
}
bool
proposer::run(int instance, std::vector<std::string> newnodes, std::string newv)
proposer::run(int instance, std::vector<std::string> c_nodes, std::string c_v)
{
std::vector<std::string> accepts;
std::vector<std::string> nodes;
......@@ -96,7 +96,7 @@ proposer::run(int instance, std::vector<std::string> newnodes, std::string newv)
pthread_mutex_lock(&pxs_mutex);
printf("start: initiate paxos for %s w. i=%d v=%s stable=%d\n",
print_members(newnodes).c_str(), instance, newv.c_str(), stable);
print_members(c_nodes).c_str(), instance, c_v.c_str(), stable);
if (!stable) { // already running proposer?
printf("proposer::run: already running\n");
pthread_mutex_unlock(&pxs_mutex);
......
......@@ -70,8 +70,6 @@ class proposer {
// Proposer state
bool stable;
std::vector<std::string> c_nodes; // nodes in this instance
std::string c_v; // value we would like to propose
prop_t my_n; // number of the last proposal used in this instance
void setn();
......
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