Skip to content

Commit acbbc05

Browse files
committed
[refactor] Inline last case of wtx.IsFromMe and remove function
No change in behavior.
1 parent faa1ec5 commit acbbc05

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
13581358
wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, filter);
13591359

13601360
bool fAllAccounts = (strAccount == string("*"));
1361-
bool involvesWatchonly = wtx.IsFromMe(ISMINE_WATCH_ONLY);
1361+
bool involvesWatchonly = (wtx.GetDebit(ISMINE_WATCH_ONLY) > 0);
13621362

13631363
// Sent
13641364
if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount))

src/wallet/wallet.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,6 @@ class CWalletTx : public CMerkleTx
421421
void GetAccountAmounts(const std::string& strAccount, CAmount& nReceived,
422422
CAmount& nSent, CAmount& nFee, const isminefilter& filter) const;
423423

424-
bool IsFromMe(const isminefilter& filter) const
425-
{
426-
return (GetDebit(filter) > 0);
427-
}
428-
429424
// True if only scriptSigs are different
430425
bool IsEquivalentTo(const CWalletTx& tx) const;
431426

0 commit comments

Comments
 (0)