Fix segfault and working first implem

This commit is contained in:
Julien CLEMENT 2020-05-06 00:33:09 +02:00
parent ea40db0fea
commit 36ebbcb00f
13 changed files with 13 additions and 1 deletions

1
legislator1/decree.txt Normal file

@ -0,0 +1 @@
0

@ -0,0 +1 @@
1

1
legislator1/next-bal.txt Normal file

@ -0,0 +1 @@
0

1
legislator2/decree.txt Normal file

@ -0,0 +1 @@
0

@ -0,0 +1 @@
0

1
legislator2/next-bal.txt Normal file

@ -0,0 +1 @@
1

@ -0,0 +1 @@
0

@ -0,0 +1 @@
1

1
legislator3/decree.txt Normal file

@ -0,0 +1 @@
0

1
legislator3/next-bal.txt Normal file

@ -0,0 +1 @@
1

@ -0,0 +1 @@
0

@ -0,0 +1 @@
1

@ -82,7 +82,7 @@ namespace paxos
void Legislator::receive_last_vote(Message message) void Legislator::receive_last_vote(Message message)
{ {
std::string ballot_str = *message.get_header("ballot"); std::string ballot_str = *message.get_header("ballot");
std::string vote_ballot_id_str = *message.get_header("vote"); std::string vote_ballot_id_str = *message.get_header("vote_ballot_id");
std::string sender = *message.get_header("sender"); std::string sender = *message.get_header("sender");
log(config_.name + " has received a LastVote(" log(config_.name + " has received a LastVote("
+ ballot_str + ", " + vote_ballot_id_str + ballot_str + ", " + vote_ballot_id_str