Calling receive_next_ballot after message treatment

This commit is contained in:
juju committed 2020-05-05 21:20:27 +02:00
1 parent 6795dd7127
commit 8f66b98ce3
6 files changed
+70 -4

No files matched your search

+4 -2
View File
@@ -28,6 +28,7 @@ namespace paxos
Message message;
message.set_method("NextBallot");
message.add_header("ballot", ballot_string);
message.add_header("sender", self->config_.name);
for (auto legislator : legislators)
SendEW::send_message(message, legislator.second);
@@ -35,8 +36,9 @@ namespace paxos
void Legislator::receive_next_ballot(Message message)
{
message = message;
log("received NextBallot", green);
std::string ballot_str = *message.get_header("ballot");
int ballot = std::stoi(ballot_str);
receive_next_ballot(ballot, *message.get_header("sender"));
}
void Legislator::receive_next_ballot(int ballot, std::string sender)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.