Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
KEP-966: merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paularchard committed Feb 1, 2019
1 parent 3948280 commit 2d8f376
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pbft/pbft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ pbft::handle_join_or_leave(const bzn_envelope& env, const pbft_membership_msg& m
pbft_membership_msg response;
response.set_type(PBFT_MMSG_JOIN_RESPONSE);
auto env = this->wrap_message(response);
session->send_message(std::make_shared<std::string>(env.SerializeAsString()), true);
session->send_message(std::make_shared<std::string>(env.SerializeAsString()));
}

return;
Expand Down
6 changes: 3 additions & 3 deletions pbft/test/pbft_join_leave_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ namespace bzn
// leave message should be ignored
EXPECT_CALL(*(this->mock_node),
send_message(Matcher<const boost::asio::ip::tcp::endpoint&>(_), AllOf(message_has_req_with_correct_type(bzn_envelope::kPbftInternalRequest),
message_has_correct_pbft_type(PBFT_MSG_PREPREPARE)), _))
message_has_correct_pbft_type(PBFT_MSG_PREPREPARE))))
.Times(Exactly(0));

auto wmsg = wrap_pbft_membership_msg(leave_msg, new_peer.uuid);
Expand Down Expand Up @@ -598,7 +598,7 @@ namespace bzn
.WillOnce(Return(true));

// ... and then a response should be sent
EXPECT_CALL(*this->mock_session, send_message(Matcher<std::shared_ptr<bzn::encoded_message>>(message_is_join_response()), _))
EXPECT_CALL(*this->mock_session, send_message(Matcher<std::shared_ptr<bzn::encoded_message>>(message_is_join_response())))
.Times(Exactly(1));

// set up the join message
Expand All @@ -624,7 +624,7 @@ namespace bzn
EXPECT_CALL(*this->mock_session, is_open())
.Times(Exactly(1))
.WillOnce(Return(true));
EXPECT_CALL(*this->mock_session, send_message(Matcher<std::shared_ptr<bzn::encoded_message>>(message_is_join_response()), _))
EXPECT_CALL(*this->mock_session, send_message(Matcher<std::shared_ptr<bzn::encoded_message>>(message_is_join_response())))
.Times(Exactly(1));

auto peer = *TEST_PEER_LIST.begin();
Expand Down

0 comments on commit 2d8f376

Please sign in to comment.