Skip to content

Commit 6056c87

Browse files
committed
Merge pull request #3662
0542619 Rename IsConfirmed to IsTrusted to better match the intended behavior. (Gregory Maxwell)
2 parents c46ad17 + 0542619 commit 6056c87

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/qt/transactionrecord.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
164164
(wtx.IsCoinBase() ? 1 : 0),
165165
wtx.nTimeReceived,
166166
idx);
167-
status.confirmed = wtx.IsConfirmed();
167+
status.confirmed = wtx.IsTrusted();
168168
status.depth = wtx.GetDepthInMainChain();
169169
status.cur_num_blocks = chainActive.Height();
170170

src/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ Value getbalance(const Array& params, bool fHelp)
621621
for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
622622
{
623623
const CWalletTx& wtx = (*it).second;
624-
if (!wtx.IsConfirmed())
624+
if (!wtx.IsTrusted())
625625
continue;
626626

627627
int64_t allFee;

src/wallet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ int64_t CWallet::GetBalance() const
964964
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
965965
{
966966
const CWalletTx* pcoin = &(*it).second;
967-
if (pcoin->IsConfirmed())
967+
if (pcoin->IsTrusted())
968968
nTotal += pcoin->GetAvailableCredit();
969969
}
970970
}
@@ -980,7 +980,7 @@ int64_t CWallet::GetUnconfirmedBalance() const
980980
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
981981
{
982982
const CWalletTx* pcoin = &(*it).second;
983-
if (!IsFinalTx(*pcoin) || !pcoin->IsConfirmed())
983+
if (!IsFinalTx(*pcoin) || !pcoin->IsTrusted())
984984
nTotal += pcoin->GetAvailableCredit();
985985
}
986986
}
@@ -1015,7 +1015,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
10151015
if (!IsFinalTx(*pcoin))
10161016
continue;
10171017

1018-
if (fOnlyConfirmed && !pcoin->IsConfirmed())
1018+
if (fOnlyConfirmed && !pcoin->IsTrusted())
10191019
continue;
10201020

10211021
if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0)
@@ -1710,7 +1710,7 @@ std::map<CTxDestination, int64_t> CWallet::GetAddressBalances()
17101710
{
17111711
CWalletTx *pcoin = &walletEntry.second;
17121712

1713-
if (!IsFinalTx(*pcoin) || !pcoin->IsConfirmed())
1713+
if (!IsFinalTx(*pcoin) || !pcoin->IsTrusted())
17141714
continue;
17151715

17161716
if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0)

src/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ class CWalletTx : public CMerkleTx
695695
return (GetDebit() > 0);
696696
}
697697

698-
bool IsConfirmed() const
698+
bool IsTrusted() const
699699
{
700700
// Quick answer in most cases
701701
if (!IsFinalTx(*this))

0 commit comments

Comments
 (0)