From 6131c5e5cc1e83fdbfbc8fc4ce419765ba3d180a Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 31 Jul 2018 13:24:14 -0400 Subject: add cmake options --- src/consensus.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/consensus.cpp') 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 &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 &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 -- cgit v1.2.3-70-g09d2