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

@ -3,8 +3,8 @@ $(package)_version=0.1
$(package)_download_path=https://github.com/zcash/$(package)/archive/
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_download_file=$($(package)_git_commit).tar.gz
$(package)_sha256_hash=ed8de6f820f4441a80457a25db022168df09ca945302d27004975b0d71c32718
$(package)_git_commit=0ef61e6d460e49e70202f8599bbdb2d39e41d061
$(package)_sha256_hash=b96a0646d4c4856bc6171dc26cce10644a6129ac92b73a91f94246fb6b7f3516
$(package)_git_commit=18f4945d942cc53e336c40bf13080934179a9047
$(package)_dependencies=rust $(rust_crates)
$(package)_patches=cargo.config

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;