From 618206c7d5e94b5a763d729951f03000a9ad4894 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 25 Jul 2018 20:03:59 -0700 Subject: [PATCH] Rename GetNoteNullifier to GetSproutNoteNullifier. --- src/wallet/gtest/test_wallet.cpp | 6 +++--- src/wallet/wallet.cpp | 14 +++++++------- src/wallet/wallet.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index bed795b16..51f17232e 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -350,7 +350,7 @@ TEST(wallet_tests, set_invalid_note_addrs_in_cwallettx) { EXPECT_THROW(wtx.SetSproutNoteData(noteData), std::logic_error); } -TEST(wallet_tests, GetNoteNullifier) { +TEST(wallet_tests, GetSproutNoteNullifier) { CWallet wallet; auto sk = libzcash::SproutSpendingKey::random(); @@ -364,7 +364,7 @@ TEST(wallet_tests, GetNoteNullifier) { auto hSig = wtx.vjoinsplit[0].h_sig( *params, wtx.joinSplitPubKey); - auto ret = wallet.GetNoteNullifier( + auto ret = wallet.GetSproutNoteNullifier( wtx.vjoinsplit[0], address, dec, @@ -373,7 +373,7 @@ TEST(wallet_tests, GetNoteNullifier) { wallet.AddSproutSpendingKey(sk); - ret = wallet.GetNoteNullifier( + ret = wallet.GetSproutNoteNullifier( wtx.vjoinsplit[0], address, dec, diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 392f1a4bd..999c5ee39 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1148,7 +1148,7 @@ bool CWallet::UpdateNullifierNoteMap() auto i = item.first.js; auto hSig = wtxItem.second.vjoinsplit[i].h_sig( *pzcashParams, wtxItem.second.joinSplitPubKey); - item.second.nullifier = GetNoteNullifier( + item.second.nullifier = GetSproutNoteNullifier( wtxItem.second.vjoinsplit[i], item.second.address, dec, @@ -1403,11 +1403,11 @@ void CWallet::EraseFromWallet(const uint256 &hash) * Returns a nullifier if the SpendingKey is available * Throws std::runtime_error if the decryptor doesn't match this note */ -boost::optional CWallet::GetNoteNullifier(const JSDescription& jsdesc, - const libzcash::SproutPaymentAddress& address, - const ZCNoteDecryption& dec, - const uint256& hSig, - uint8_t n) const +boost::optional CWallet::GetSproutNoteNullifier(const JSDescription &jsdesc, + const libzcash::SproutPaymentAddress &address, + const ZCNoteDecryption &dec, + const uint256 &hSig, + uint8_t n) const { boost::optional ret; auto note_pt = libzcash::SproutNotePlaintext::decrypt( @@ -1448,7 +1448,7 @@ mapSproutNoteData_t CWallet::FindMySproutNotes(const CTransaction &tx) const try { auto address = item.first; JSOutPoint jsoutpt {hash, i, j}; - auto nullifier = GetNoteNullifier( + auto nullifier = GetSproutNoteNullifier( tx.vjoinsplit[i], address, item.second, diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 33c878934..1d56de863 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1076,7 +1076,7 @@ public: std::set GetAccountAddresses(const std::string& strAccount) const; - boost::optional GetNoteNullifier( + boost::optional GetSproutNoteNullifier( const JSDescription& jsdesc, const libzcash::SproutPaymentAddress& address, const ZCNoteDecryption& dec,