From 928b2c1910bfe957a4cc31746aa395c9ed98006f Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 19 Jul 2018 20:07:16 -0400 Subject: ... --- src/crypto.cpp | 4 +++- src/hotstuff.cpp | 2 +- src/hotstuff_app.cpp | 2 +- src/hotstuff_client.cpp | 6 ++---- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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(config.get_pubkey(rids.get(i))))) + static_cast(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 &blks) { } void MsgHotStuff::parse_rfetchblk(std::vector &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 buffers; -std::unordered_map waiting; -MsgNetwork mn(eb, 10, 10, 4096); - std::unordered_map::conn_t> conns; +std::unordered_map waiting; std::vector replicas; +MsgNetwork mn(eb, 10, 10, 4096); void set_proposer(ReplicaID rid) { proposer = rid; -- cgit v1.2.3-70-g09d2