Improve accuracy of constraint system violation diagnostics.

This commit is contained in:
Sean Bowe
2016-11-05 11:27:23 -06:00
parent b55744e1ad
commit 5f0a73ce11
4 changed files with 30 additions and 7 deletions

View File

@@ -70,6 +70,17 @@ void IncrementalMerkleTree<Depth, Hash>::wfcheck() const {
}
}
template<size_t Depth, typename Hash>
Hash IncrementalMerkleTree<Depth, Hash>::last() const {
if (right) {
return *right;
} else if (left) {
return *left;
} else {
throw std::runtime_error("tree has no cursor");
}
}
template<size_t Depth, typename Hash>
void IncrementalMerkleTree<Depth, Hash>::append(Hash obj) {
if (is_complete(Depth)) {