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);
}
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,

View File

@ -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<uint256> CWallet::GetNoteNullifier(const JSDescription& jsdesc,
const libzcash::SproutPaymentAddress& address,
const ZCNoteDecryption& dec,
const uint256& hSig,
uint8_t n) const
boost::optional<uint256> CWallet::GetSproutNoteNullifier(const JSDescription &jsdesc,
const libzcash::SproutPaymentAddress &address,
const ZCNoteDecryption &dec,
const uint256 &hSig,
uint8_t n) const
{
boost::optional<uint256> 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,

View File

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