Fix bug where we were returning a nil tree builder

This commit is contained in:
Andrew Ayer 2016-02-18 11:58:00 -08:00
parent 16bf546258
commit 672491e065
1 changed files with 4 additions and 1 deletions

View File

@ -26,7 +26,10 @@ func VerifyConsistencyProof (proof ct.ConsistencyProof, first *ct.SignedTreeHead
// nature of the tree; i.e. that the first tree is a "prefix" of the
// second tree. If the first tree is empty, then it's trivially a prefix
// of the second tree, so no proof is needed.
return len(proof) == 0, nil
if len(proof) != 0 {
return false, nil
}
return true, &MerkleTreeBuilder{stack: []ct.MerkleTreeNode{}, size: 0}
}
// Guaranteed that 0 < first.TreeSize < second.TreeSize