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

Commit

Permalink
fixed pbft
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruck committed Mar 18, 2019
1 parent 6614b78 commit 13b4a36
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pbft/pbft.cpp
Expand Up @@ -1099,11 +1099,22 @@ pbft::max_faulty_nodes() const
void
pbft::handle_database_message(const bzn_envelope& msg, std::shared_ptr<bzn::session_base> session)
{
// TODO: timestamp should be set by the client. setting it here breaks the signature (which is correct).

LOG(debug) << "got database message";

if (!this->service->apply_operation_now(msg, session))
{
this->handle_request(mutable_msg, session);
if (msg.timestamp() == 0)
{
bzn_envelope mutable_msg(msg);
mutable_msg.set_timestamp(this->now());
this->handle_request(mutable_msg, session);
}
else
{
this->handle_request(msg, session);
}
}
}

Expand Down

0 comments on commit 13b4a36

Please sign in to comment.