Remove the Merkle tree hash function's fixed point.

This commit is contained in:
Taylor Hornby
2016-05-04 09:15:14 -06:00
parent 9e387120eb
commit bf2e3122ac
8 changed files with 251 additions and 132 deletions

View File

@@ -70,7 +70,7 @@ CCoinsViewDB::CCoinsViewDB(size_t nCacheSize, bool fMemory, bool fWipe) : db(Get
bool CCoinsViewDB::GetAnchorAt(const uint256 &rt, ZCIncrementalMerkleTree &tree) const {
if (rt.IsNull()) {
if (rt == ZCIncrementalMerkleTree::empty_root()) {
ZCIncrementalMerkleTree new_tree;
tree = new_tree;
return true;
@@ -106,7 +106,7 @@ uint256 CCoinsViewDB::GetBestBlock() const {
uint256 CCoinsViewDB::GetBestAnchor() const {
uint256 hashBestAnchor;
if (!db.Read(DB_BEST_ANCHOR, hashBestAnchor))
return uint256();
return ZCIncrementalMerkleTree::empty_root();
return hashBestAnchor;
}