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

@@ -79,6 +79,7 @@ public:
Hash root() const {
return root(Depth, std::deque<Hash>());
}
Hash last() const;
IncrementalWitness<Depth, Hash> witness() const {
return IncrementalWitness<Depth, Hash>(*this);
@@ -138,6 +139,12 @@ public:
return tree.path(partial_path());
}
// Return the element being witnessed (should be a note
// commitment!)
Hash element() const {
return tree.last();
}
Hash root() const {
return tree.root(Depth, partial_path());
}