Make Hash[160] consume range-like objects

This commit is contained in:
Pieter Wuille
2020-06-26 13:36:41 -07:00
parent 02c4cc5c5d
commit 77c507358b
16 changed files with 40 additions and 63 deletions

View File

@@ -70,7 +70,7 @@ uint256 CPartialMerkleTree::CalcHash(int height, unsigned int pos, const std::ve
else
right = left;
// combine subhashes
return Hash(left.begin(), left.end(), right.begin(), right.end());
return Hash(left, right);
}
}
@@ -126,7 +126,7 @@ uint256 CPartialMerkleTree::TraverseAndExtract(int height, unsigned int pos, uns
right = left;
}
// and combine them before returning
return Hash(left.begin(), left.end(), right.begin(), right.end());
return Hash(left, right);
}
}