aboutsummaryrefslogtreecommitdiff
path: root/include/hotstuff/consensus.h
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-09-10 16:06:27 -0400
committerDeterminant <ted.sybil@gmail.com>2018-09-10 16:06:27 -0400
commit6261c95184b86c43755071b351e6928f89e2343c (patch)
tree7a33a5d8ad3b252f629d52c5183eab90efb3438a /include/hotstuff/consensus.h
parent05f2c56b909a2cd05a200ad663001696e4a23261 (diff)
finish simple multithreaded verifier
Diffstat (limited to 'include/hotstuff/consensus.h')
-rw-r--r--include/hotstuff/consensus.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hotstuff/consensus.h b/include/hotstuff/consensus.h
index 65ffff2..9e2558c 100644
--- a/include/hotstuff/consensus.h
+++ b/include/hotstuff/consensus.h
@@ -253,6 +253,13 @@ struct Vote: public Serializable {
cert->get_blk_hash() == blk_hash;
}
+ promise_t verify(VeriPool &vpool) const {
+ assert(hsc != nullptr);
+ return cert->verify(hsc->get_config().get_pubkey(voter), vpool).then([this](bool result) {
+ return result && cert->get_blk_hash() == blk_hash;
+ });
+ }
+
operator std::string () const {
DataStream s;
s << "<vote "