Skip to content

Commit b47e783

Browse files
committed
Move GetCredit CTransaction to CWalletTx to be able to decrypt the sapling note if needed.
1 parent 29c8641 commit b47e783

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4450,7 +4450,7 @@ CAmount CWallet::GetDebit(const CTransaction& tx, const isminefilter& filter) co
44504450
return nDebit;
44514451
}
44524452

4453-
CAmount CWallet::GetCredit(const CTransaction& tx, const isminefilter& filter) const
4453+
CAmount CWallet::GetCredit(const CWalletTx& tx, const isminefilter& filter) const
44544454
{
44554455
CAmount nCredit = 0;
44564456
for (unsigned int i = 0; i < tx.vout.size(); i++) {

src/wallet/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
689689
/** should probably be renamed to IsRelevantToMe */
690690
bool IsFromMe(const CTransaction& tx) const;
691691
CAmount GetDebit(const CTransaction& tx, const isminefilter& filter) const;
692-
CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const;
692+
CAmount GetCredit(const CWalletTx& tx, const isminefilter& filter) const;
693693
CAmount GetChange(const CTransaction& tx) const;
694694

695695
//! Sapling merkle tree update

0 commit comments

Comments
 (0)