diff --git a/src/wallet/gtest/test_wallet_zkeys.cpp b/src/wallet/gtest/test_wallet_zkeys.cpp index 8a2ecd8d3..e4a8eeeb4 100644 --- a/src/wallet/gtest/test_wallet_zkeys.cpp +++ b/src/wallet/gtest/test_wallet_zkeys.cpp @@ -63,7 +63,7 @@ TEST(wallet_zkeys_tests, store_and_load_sapling_zkeys) { /** * This test covers methods on CWallet * GenerateNewZKey() - * AddZKey() + * AddSproutZKey() * LoadZKey() * LoadZKeyMetadata() */ @@ -89,7 +89,7 @@ TEST(wallet_zkeys_tests, store_and_load_zkeys) { // manually add new spending key to wallet auto sk = libzcash::SproutSpendingKey::random(); - ASSERT_TRUE(wallet.AddZKey(sk)); + ASSERT_TRUE(wallet.AddSproutZKey(sk)); // verify wallet did add it addr = sk.address(); diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 87d29a6ec..c2f4f510f 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -308,7 +308,7 @@ UniValue importwallet_impl(const UniValue& params, bool fHelp, bool fImportZKeys } int64_t nTime = DecodeDumpTime(vstr[1]); LogPrint("zrpc", "Importing zaddr %s...\n", EncodePaymentAddress(addr)); - if (!pwalletMain->AddZKey(key)) { + if (!pwalletMain->AddSproutZKey(key)) { // Something went wrong fGood = false; continue; @@ -580,7 +580,7 @@ public: } else { m_wallet->MarkDirty(); - if (!m_wallet-> AddZKey(sk)) { + if (!m_wallet-> AddSproutZKey(sk)) { throw JSONRPCError(RPC_WALLET_ERROR, "Error adding spending key to wallet"); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index abd064501..e39c687c3 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -96,8 +96,8 @@ libzcash::PaymentAddress CWallet::GenerateNewZKey() int64_t nCreationTime = GetTime(); mapSproutZKeyMetadata[addr] = CKeyMetadata(nCreationTime); - if (!AddZKey(k)) - throw std::runtime_error("CWallet::GenerateNewZKey(): AddZKey failed"); + if (!AddSproutZKey(k)) + throw std::runtime_error("CWallet::GenerateNewZKey(): AddSproutZKey failed"); return addr; } @@ -169,7 +169,7 @@ bool CWallet::AddSaplingZKey( // Add spending key to keystore and persist to disk -bool CWallet::AddZKey(const libzcash::SproutSpendingKey &key) +bool CWallet::AddSproutZKey(const libzcash::SproutSpendingKey &key) { AssertLockHeld(cs_wallet); // mapSproutZKeyMetadata auto addr = key.address(); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index e660c82df..1b7331d0c 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1031,7 +1031,7 @@ public: //! Generates a new zaddr libzcash::PaymentAddress GenerateNewZKey(); //! Adds spending key to the store, and saves it to disk - bool AddZKey(const libzcash::SproutSpendingKey &key); + bool AddSproutZKey(const libzcash::SproutSpendingKey &key); //! Adds spending key to the store, without saving it to disk (used by LoadWallet) bool LoadZKey(const libzcash::SproutSpendingKey &key); //! Load spending key metadata (used by LoadWallet)