From d265f782e77e8e262dc668372a32d4f79af9ef45 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 29 May 2020 23:35:11 -0400 Subject: [PATCH] desprout --- src/wallet/wallet.cpp | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 3145bbd88..558f2020a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -234,25 +234,7 @@ bool CWallet::AddSaplingIncomingViewingKey( // Add spending key to keystore and persist to disk bool CWallet::AddSproutZKey(const libzcash::SproutSpendingKey &key) { - AssertLockHeld(cs_wallet); // mapSproutZKeyMetadata - auto addr = key.address(); - - if (!CCryptoKeyStore::AddSproutSpendingKey(key)) - return false; - - // check if we need to remove from viewing keys - if (HaveSproutViewingKey(addr)) - RemoveSproutViewingKey(key.viewing_key()); - - if (!fFileBacked) - return true; - - if (!IsCrypted()) { - return CWalletDB(strWalletFile).WriteZKey(addr, - key, - mapSproutZKeyMetadata[addr]); - } - return true; + return false; } CPubKey CWallet::GenerateNewKey() @@ -2344,13 +2326,6 @@ bool CWallet::IsFromMe(const CTransaction& tx) const if (GetDebit(tx, ISMINE_ALL) > 0) { return true; } - for (const JSDescription& jsdesc : tx.vjoinsplit) { - for (const uint256& nullifier : jsdesc.nullifiers) { - if (IsSproutNullifierFromMe(nullifier)) { - return true; - } - } - } for (const SpendDescription &spend : tx.vShieldedSpend) { if (IsSaplingNullifierFromMe(spend.nullifier)) { return true; @@ -2488,18 +2463,6 @@ bool CWallet::LoadCryptedHDSeed(const uint256& seedFp, const std::vector nd : noteData) { - if (nd.first.js < vjoinsplit.size() && - nd.first.n < vjoinsplit[nd.first.js].ciphertexts.size()) { - // Store the address and nullifier for the Note - mapSproutNoteData[nd.first] = nd.second; - } else { - // If FindMySproutNotes() was used to obtain noteData, - // this should never happen - throw std::logic_error("CWalletTx::SetSproutNoteData(): Invalid note"); - } - } } void CWalletTx::SetSaplingNoteData(mapSaplingNoteData_t ¬eData)