Fix default_address()
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
TEST(keystore_tests, sapling_keys) {
|
||||
auto sk = libzcash::SaplingSpendingKey::random();
|
||||
auto addr = sk.default_address();
|
||||
|
||||
// Check that full viewing key derived from sk and expanded sk are the same
|
||||
auto exp_sk = sk.expanded_spending_key();
|
||||
|
||||
@@ -60,7 +60,7 @@ std::array<unsigned char, 11> default_diversifier(const uint256& sk)
|
||||
while (true) {
|
||||
crypto_generichash_blake2b_state state;
|
||||
crypto_generichash_blake2b_init_salt_personal(&state, nullptr, 0, 64, nullptr, ZCASH_EXPANDSEED_PERSONALIZATION);
|
||||
crypto_generichash_blake2b_update(&state, blob, 33);
|
||||
crypto_generichash_blake2b_update(&state, blob, 34);
|
||||
crypto_generichash_blake2b_final(&state, res.data(), 11);
|
||||
|
||||
if (librustzcash_check_diversifier(res.data())) {
|
||||
|
||||
Reference in New Issue
Block a user