diff --git a/src/zerocash/utils/util.cpp b/src/zerocash/utils/util.cpp index 2f571df5..1c303ea7 100644 --- a/src/zerocash/utils/util.cpp +++ b/src/zerocash/utils/util.cpp @@ -209,8 +209,11 @@ void sha256(const unsigned char* input, unsigned char* hash, int len) { } void sha256(CSHA256& hasher, const unsigned char* input, unsigned char* hash, int len) { - hasher.Write(input, len); - hasher.FinalizeNoPadding(hash); + // Ignore the one that's passed in; this optimization is useless + // for all of our code, and this code is all being removed anyway. + CSHA256 new_hasher; + new_hasher.Write(input, len); + new_hasher.FinalizeNoPadding(hash); } void hashVector(CSHA256& hasher, const std::vector input, std::vector& output) {