aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/hotstuff/consensus.h8
-rw-r--r--include/hotstuff/entity.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/include/hotstuff/consensus.h b/include/hotstuff/consensus.h
index 1f1e6ea..a3a1f25 100644
--- a/include/hotstuff/consensus.h
+++ b/include/hotstuff/consensus.h
@@ -45,7 +45,9 @@ class HotStuffCore {
BoxObj<EntityStorage> storage;
HotStuffCore(ReplicaID id, privkey_bt &&priv_key);
- virtual ~HotStuffCore() = default;
+ virtual ~HotStuffCore() {
+ b0->qc_ref = nullptr;
+ }
/* Inputs of the state machine triggered by external events, should called
* by the class user, with proper invariants. */
@@ -173,7 +175,7 @@ struct Proposal: public Serializable {
<< "rid=" << std::to_string(proposer) << " "
<< "bqc=" << get_hex10(bqc_hash) << " "
<< "blk=" << get_hex10(blk->get_hash()) << ">";
- return std::string(std::move(s));
+ return std::move(s);
}
};
@@ -243,7 +245,7 @@ struct Vote: public Serializable {
<< "bqc=" << get_hex10(bqc_hash) << " "
<< "blk=" << get_hex10(blk_hash) << " "
<< "cert=" << (cert ? "yes" : "no") << ">";
- return std::string(std::move(s));
+ return std::move(s);
}
};
diff --git a/include/hotstuff/entity.h b/include/hotstuff/entity.h
index 03aff06..28b5148 100644
--- a/include/hotstuff/entity.h
+++ b/include/hotstuff/entity.h
@@ -184,7 +184,7 @@ class Block {
<< "id=" << get_hex10(hash) << " "
<< "height=" << std::to_string(height) << " "
<< "parent=" << get_hex10(parent_hashes[0]) << ">";
- return std::string(std::move(s));
+ return std::move(s);
}
};