aboutsummaryrefslogtreecommitdiff
path: root/src/consensus.cpp
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2020-02-25 16:16:33 -0500
committerDeterminant <ted.sybil@gmail.com>2020-02-25 16:16:33 -0500
commit601fe38247a8232694a3c9af282c179e6ad1720d (patch)
treed72360651d73d67af6bc3bd51801b8fb1825d8e0 /src/consensus.cpp
parent978f39fb6e01256d388bc295e4fd8138f20ef58f (diff)
bump salticidae version and make some minor changes
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 7a577c5..9de7cc2 100644
--- a/src/consensus.cpp
+++ b/src/consensus.cpp
@@ -53,7 +53,7 @@ block_t HotStuffCore::get_delivered_blk(const uint256_t &blk_hash) {
block_t blk = storage->find_blk(blk_hash);
if (blk == nullptr || !blk->delivered)
throw std::runtime_error("block not delivered");
- return std::move(blk);
+ return blk;
}
bool HotStuffCore::on_deliver_blk(const block_t &blk) {
@@ -279,10 +279,10 @@ void HotStuffCore::prune(uint32_t staleness) {
}
}
-void HotStuffCore::add_replica(ReplicaID rid, const NetAddr &addr,
+void HotStuffCore::add_replica(ReplicaID rid, const PeerId &peer_id,
pubkey_bt &&pub_key) {
- config.add_replica(rid,
- ReplicaInfo(rid, addr, std::move(pub_key)));
+ config.add_replica(rid,
+ ReplicaInfo(rid, peer_id, std::move(pub_key)));
b0->voted.insert(rid);
}
@@ -351,7 +351,7 @@ HotStuffCore::operator std::string () const {
<< "b_exec=" << get_hex10(b_exec->get_hash()) << " "
<< "vheight=" << std::to_string(vheight) << " "
<< "tails=" << std::to_string(tails.size()) << ">";
- return std::move(s);
+ return s;
}
}