diff options
author | Determinant <[email protected]> | 2018-08-03 18:09:01 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2018-08-03 18:09:01 -0400 |
commit | edcadfb47b736e6c9dd6b078689114aecf5c1add (patch) | |
tree | ae292e6448e8f078b735ce8b4ff7537986f26a48 /src/consensus.cpp | |
parent | 8b912c47e19353a419c8717f7a839b0d63f5cc6c (diff) |
allow extra data in blocks
Diffstat (limited to 'src/consensus.cpp')
-rw-r--r-- | src/consensus.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/consensus.cpp b/src/consensus.cpp index 2cac22c..e25558a 100644 --- a/src/consensus.cpp +++ b/src/consensus.cpp @@ -109,7 +109,8 @@ bool HotStuffCore::update(const uint256_t &bqc_hash) { } void HotStuffCore::on_propose(const std::vector<command_t> &cmds, - const std::vector<block_t> &parents) { + const std::vector<block_t> &parents, + serializable_bt &&extra) { if (parents.empty()) throw std::runtime_error("empty parents"); for (const auto &_: parents) tails.erase(_); @@ -125,11 +126,10 @@ void HotStuffCore::on_propose(const std::vector<command_t> &cmds, } /* create the new block */ block_t bnew = storage->add_blk( - new Block( - parents, - cmds, + new Block(parents, cmds, + std::move(qc), std::move(extra), p->height + 1, - std::move(qc), qc_ref, + qc_ref, nullptr )); const uint256_t bnew_hash = bnew->get_hash(); |