aboutsummaryrefslogtreecommitdiff
path: root/src/consensus.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-07-31 13:24:14 -0400
committerDeterminant <[email protected]>2018-07-31 13:24:14 -0400
commit6131c5e5cc1e83fdbfbc8fc4ce419765ba3d180a (patch)
treef49440a55b84391029516ebd4de28cb266880c8b /src/consensus.cpp
parentec6a1f84324faf8e7c92f32137464db57410f58a (diff)
add cmake options
Diffstat (limited to 'src/consensus.cpp')
-rw-r--r--src/consensus.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/consensus.cpp b/src/consensus.cpp
index ac7e56a..cc1d572 100644
--- a/src/consensus.cpp
+++ b/src/consensus.cpp
@@ -88,7 +88,7 @@ void HotStuffCore::check_commit(const block_t &_blk) {
{
const block_t &blk = *it;
blk->decision = 1;
-#ifdef HOTSTUFF_ENABLE_LOG_PROTO
+#ifdef HOTSTUFF_PROTO_LOG
LOG_INFO("commit %s", std::string(*blk).c_str());
#endif
size_t idx = 0;
@@ -137,7 +137,7 @@ void HotStuffCore::on_propose(const std::vector<command_t> &cmds,
on_deliver_blk(bnew);
update(bnew_hash);
Proposal prop(id, bqc->get_hash(), bnew, nullptr);
-#ifdef HOTSTUFF_ENABLE_LOG_PROTO
+#ifdef HOTSTUFF_PROTO_LOG
LOG_INFO("propose %s", std::string(*bnew).c_str());
#endif
/* self-vote */
@@ -151,7 +151,7 @@ void HotStuffCore::on_propose(const std::vector<command_t> &cmds,
void HotStuffCore::on_receive_proposal(const Proposal &prop) {
if (!update(prop.bqc_hash)) return;
-#ifdef HOTSTUFF_ENABLE_LOG_PROTO
+#ifdef HOTSTUFF_PROTO_LOG
LOG_INFO("got %s", std::string(prop).c_str());
#endif
block_t bnew = prop.blk;
@@ -170,7 +170,7 @@ void HotStuffCore::on_receive_proposal(const Proposal &prop) {
vheight = bnew->height;
}
}
-#ifdef HOTSTUFF_ENABLE_LOG_PROTO
+#ifdef HOTSTUFF_PROTO_LOG
LOG_INFO("now state: %s", std::string(*this).c_str());
#endif
do_vote(prop.proposer,
@@ -185,7 +185,7 @@ void HotStuffCore::on_receive_proposal(const Proposal &prop) {
void HotStuffCore::on_receive_vote(const Vote &vote) {
if (!update(vote.bqc_hash)) return;
-#ifdef HOTSTUFF_ENABLE_LOG_PROTO
+#ifdef HOTSTUFF_PROTO_LOG
LOG_INFO("got %s", std::string(vote).c_str());
LOG_INFO("now state: %s", std::string(*this).c_str());
#endif