aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crypto.cpp4
-rw-r--r--src/hotstuff.cpp2
-rw-r--r--src/hotstuff_app.cpp2
-rw-r--r--src/hotstuff_client.cpp6
4 files changed, 7 insertions, 7 deletions
diff --git a/src/crypto.cpp b/src/crypto.cpp
index 7450229..560a8ac 100644
--- a/src/crypto.cpp
+++ b/src/crypto.cpp
@@ -17,7 +17,9 @@ bool QuorumCertSecp256k1::verify(const ReplicaConfig &config) {
if (rids.size() < config.nmajority) return false;
for (size_t i = 0; i < rids.size(); i++)
if (!sigs[i].verify(_blk_hash,
- static_cast<const PubKeySecp256k1 &>(config.get_pubkey(rids.get(i)))))
+ static_cast<const PubKeySecp256k1 &>(config.get_pubkey(rids.get(i))),
+ secp256k1_default_verify_ctx
+ ))
return false;
return true;
}
diff --git a/src/hotstuff.cpp b/src/hotstuff.cpp
index 687e21d..b247d2e 100644
--- a/src/hotstuff.cpp
+++ b/src/hotstuff.cpp
@@ -52,7 +52,7 @@ void MsgHotStuff::gen_rfetchblk(const std::vector<block_t> &blks) {
}
void MsgHotStuff::parse_rfetchblk(std::vector<block_t> &blks, HotStuffCore *hsc) const {
- DataStream s;
+ DataStream s(get_payload());
uint32_t size;
s >> size;
size = letoh(size);
diff --git a/src/hotstuff_app.cpp b/src/hotstuff_app.cpp
index c629809..eae73d1 100644
--- a/src/hotstuff_app.cpp
+++ b/src/hotstuff_app.cpp
@@ -265,6 +265,6 @@ void HotStuffApp::start() {
void HotStuffApp::print_stat_cb(evutil_socket_t, short) {
HotStuff::print_stat();
- HotStuffCore::prune(100);
+ //HotStuffCore::prune(100);
ev_stat_timer.add_with_timeout(stat_period);
}
diff --git a/src/hotstuff_client.cpp b/src/hotstuff_client.cpp
index 3931a0c..2fd36bd 100644
--- a/src/hotstuff_client.cpp
+++ b/src/hotstuff_client.cpp
@@ -37,12 +37,10 @@ struct Request {
rid(rid), cmd(cmd) { et.start(); }
};
-std::unordered_map<int, salticidae::RingBuffer> buffers;
-std::unordered_map<const uint256_t, Request> waiting;
-MsgNetwork<MsgClient> mn(eb, 10, 10, 4096);
-
std::unordered_map<ReplicaID, MsgNetwork<MsgClient>::conn_t> conns;
+std::unordered_map<const uint256_t, Request> waiting;
std::vector<NetAddr> replicas;
+MsgNetwork<MsgClient> mn(eb, 10, 10, 4096);
void set_proposer(ReplicaID rid) {
proposer = rid;