Rename GetNoteNullifier to GetSproutNoteNullifier.

This commit is contained in:
Simon 2018-07-25 20:03:59 -07:00
parent 57faf44e61
commit 618206c7d5
3 changed files with 11 additions and 11 deletions

View File

@ -350,7 +350,7 @@ TEST(wallet_tests, set_invalid_note_addrs_in_cwallettx) {
EXPECT_THROW(wtx.SetSproutNoteData(noteData), std::logic_error); EXPECT_THROW(wtx.SetSproutNoteData(noteData), std::logic_error);
} }
TEST(wallet_tests, GetNoteNullifier) { TEST(wallet_tests, GetSproutNoteNullifier) {
CWallet wallet; CWallet wallet;
auto sk = libzcash::SproutSpendingKey::random(); auto sk = libzcash::SproutSpendingKey::random();
@ -364,7 +364,7 @@ TEST(wallet_tests, GetNoteNullifier) {
auto hSig = wtx.vjoinsplit[0].h_sig( auto hSig = wtx.vjoinsplit[0].h_sig(
*params, wtx.joinSplitPubKey); *params, wtx.joinSplitPubKey);
auto ret = wallet.GetNoteNullifier( auto ret = wallet.GetSproutNoteNullifier(
wtx.vjoinsplit[0], wtx.vjoinsplit[0],
address, address,
dec, dec,
@ -373,7 +373,7 @@ TEST(wallet_tests, GetNoteNullifier) {
wallet.AddSproutSpendingKey(sk); wallet.AddSproutSpendingKey(sk);
ret = wallet.GetNoteNullifier( ret = wallet.GetSproutNoteNullifier(
wtx.vjoinsplit[0], wtx.vjoinsplit[0],
address, address,
dec, dec,

View File

@ -1148,7 +1148,7 @@ bool CWallet::UpdateNullifierNoteMap()
auto i = item.first.js; auto i = item.first.js;
auto hSig = wtxItem.second.vjoinsplit[i].h_sig( auto hSig = wtxItem.second.vjoinsplit[i].h_sig(
*pzcashParams, wtxItem.second.joinSplitPubKey); *pzcashParams, wtxItem.second.joinSplitPubKey);
item.second.nullifier = GetNoteNullifier( item.second.nullifier = GetSproutNoteNullifier(
wtxItem.second.vjoinsplit[i], wtxItem.second.vjoinsplit[i],
item.second.address, item.second.address,
dec, dec,
@ -1403,11 +1403,11 @@ void CWallet::EraseFromWallet(const uint256 &hash)
* Returns a nullifier if the SpendingKey is available * Returns a nullifier if the SpendingKey is available
* Throws std::runtime_error if the decryptor doesn't match this note * Throws std::runtime_error if the decryptor doesn't match this note
*/ */
boost::optional<uint256> CWallet::GetNoteNullifier(const JSDescription& jsdesc, boost::optional<uint256> CWallet::GetSproutNoteNullifier(const JSDescription &jsdesc,
const libzcash::SproutPaymentAddress& address, const libzcash::SproutPaymentAddress &address,
const ZCNoteDecryption& dec, const ZCNoteDecryption &dec,
const uint256& hSig, const uint256 &hSig,
uint8_t n) const uint8_t n) const
{ {
boost::optional<uint256> ret; boost::optional<uint256> ret;
auto note_pt = libzcash::SproutNotePlaintext::decrypt( auto note_pt = libzcash::SproutNotePlaintext::decrypt(
@ -1448,7 +1448,7 @@ mapSproutNoteData_t CWallet::FindMySproutNotes(const CTransaction &tx) const
try { try {
auto address = item.first; auto address = item.first;
JSOutPoint jsoutpt {hash, i, j}; JSOutPoint jsoutpt {hash, i, j};
auto nullifier = GetNoteNullifier( auto nullifier = GetSproutNoteNullifier(
tx.vjoinsplit[i], tx.vjoinsplit[i],
address, address,
item.second, item.second,

View File

@ -1076,7 +1076,7 @@ public:
std::set<CTxDestination> GetAccountAddresses(const std::string& strAccount) const; std::set<CTxDestination> GetAccountAddresses(const std::string& strAccount) const;
boost::optional<uint256> GetNoteNullifier( boost::optional<uint256> GetSproutNoteNullifier(
const JSDescription& jsdesc, const JSDescription& jsdesc,
const libzcash::SproutPaymentAddress& address, const libzcash::SproutPaymentAddress& address,
const ZCNoteDecryption& dec, const ZCNoteDecryption& dec,