Minimal sapling key test
This commit is contained in:
@@ -7,6 +7,17 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "zcash/Address.hpp"
|
#include "zcash/Address.hpp"
|
||||||
|
|
||||||
|
TEST(keystore_tests, sapling_keys) {
|
||||||
|
auto sk = libzcash::SaplingSpendingKey::random();
|
||||||
|
|
||||||
|
// Check that full viewing key derived from sk and expanded sk are the same
|
||||||
|
auto exp_sk = sk.expanded_spending_key();
|
||||||
|
auto full_viewing_key = sk.full_viewing_key();
|
||||||
|
EXPECT_EQ(full_viewing_key, exp_sk.full_viewing_key());
|
||||||
|
|
||||||
|
auto in_viewing_key = full_viewing_key.in_viewing_key();
|
||||||
|
}
|
||||||
|
|
||||||
TEST(keystore_tests, store_and_retrieve_spending_key) {
|
TEST(keystore_tests, store_and_retrieve_spending_key) {
|
||||||
CBasicKeyStore keyStore;
|
CBasicKeyStore keyStore;
|
||||||
libzcash::SproutSpendingKey skOut;
|
libzcash::SproutSpendingKey skOut;
|
||||||
|
|||||||
Reference in New Issue
Block a user