From 26007222e89a69fed9c06ad05609774116ad13d4 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Tue, 3 May 2016 11:23:54 -0600 Subject: [PATCH] Distinguish the failure cases of wfcheck in tree. --- src/zcash/IncrementalMerkleTree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zcash/IncrementalMerkleTree.cpp b/src/zcash/IncrementalMerkleTree.cpp index 426abe1de..58f6a0bdc 100644 --- a/src/zcash/IncrementalMerkleTree.cpp +++ b/src/zcash/IncrementalMerkleTree.cpp @@ -59,12 +59,12 @@ void IncrementalMerkleTree::wfcheck() const { // Left cannot be empty when right exists. if (!left && right) { - throw std::ios_base::failure("tree has non-canonical representation of tree"); + throw std::ios_base::failure("tree has non-canonical representation; right should not exist"); } // Left cannot be empty when parents is nonempty. if (!left && parents.size() > 0) { - throw std::ios_base::failure("tree has non-canonical representation of tree"); + throw std::ios_base::failure("tree has non-canonical representation; parents should not be unempty"); } }