Update librustzcash dependency, address comments

This commit is contained in:
Jay Graber
2018-06-01 01:48:28 -07:00
parent 84e3a2212f
commit 52d81ff794
2 changed files with 4 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ std::array<unsigned char, 64> PRF_expand(const uint256& sk, unsigned char t)
std::array<unsigned char, 64> res;
unsigned char blob[33];
memcpy(&blob[0], x.begin(), 32);
memcpy(&blob[0], sk.begin(), 32);
blob[32] = t;
crypto_generichash_blake2b_state state;
@@ -65,7 +65,7 @@ std::array<unsigned char, 11> default_diversifier(const uint256& sk)
if (librustzcash_check_diversifier(res.data())) {
break;
} else if (blob[33] > 255) {
} else if (blob[33] == 255) {
throw std::runtime_error("librustzcash_check_diversifier did not return valid diversifier");
}
blob[33] += 1;