aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-02-13 20:12:34 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-02-13 20:12:46 +0100
commit6056c87d25994bbceb23d6ae50df1276a51d51bd (patch)
treeb96fc427df87c50b6a96d60ecc07743fb8a8112b
parentc46ad177856a0c4f465c502513e151e5f07bf278 (diff)
parent0542619d93811fdb73508abb5299b8fd77f47a0e (diff)
Merge pull request #3662
0542619 Rename IsConfirmed to IsTrusted to better match the intended behavior. (Gregory Maxwell)
-rw-r--r--src/qt/transactionrecord.cpp2
-rw-r--r--src/rpcwallet.cpp2
-rw-r--r--src/wallet.cpp8
-rw-r--r--src/wallet.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 257151b926..b6614fc371 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -164,7 +164,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
(wtx.IsCoinBase() ? 1 : 0),
wtx.nTimeReceived,
idx);
- status.confirmed = wtx.IsConfirmed();
+ status.confirmed = wtx.IsTrusted();
status.depth = wtx.GetDepthInMainChain();
status.cur_num_blocks = chainActive.Height();
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 51e9aabecc..bcbae06682 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -621,7 +621,7 @@ Value getbalance(const Array& params, bool fHelp)
for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
{
const CWalletTx& wtx = (*it).second;
- if (!wtx.IsConfirmed())
+ if (!wtx.IsTrusted())
continue;
int64_t allFee;
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 0e51ebb448..e3c460ff33 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -964,7 +964,7 @@ int64_t CWallet::GetBalance() const
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;
- if (pcoin->IsConfirmed())
+ if (pcoin->IsTrusted())
nTotal += pcoin->GetAvailableCredit();
}
}
@@ -980,7 +980,7 @@ int64_t CWallet::GetUnconfirmedBalance() const
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;
- if (!IsFinalTx(*pcoin) || !pcoin->IsConfirmed())
+ if (!IsFinalTx(*pcoin) || !pcoin->IsTrusted())
nTotal += pcoin->GetAvailableCredit();
}
}
@@ -1015,7 +1015,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
if (!IsFinalTx(*pcoin))
continue;
- if (fOnlyConfirmed && !pcoin->IsConfirmed())
+ if (fOnlyConfirmed && !pcoin->IsTrusted())
continue;
if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0)
@@ -1710,7 +1710,7 @@ std::map<CTxDestination, int64_t> CWallet::GetAddressBalances()
{
CWalletTx *pcoin = &walletEntry.second;
- if (!IsFinalTx(*pcoin) || !pcoin->IsConfirmed())
+ if (!IsFinalTx(*pcoin) || !pcoin->IsTrusted())
continue;
if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0)
diff --git a/src/wallet.h b/src/wallet.h
index e5104f1362..ca40ba8185 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -695,7 +695,7 @@ public:
return (GetDebit() > 0);
}
- bool IsConfirmed() const
+ bool IsTrusted() const
{
// Quick answer in most cases
if (!IsFinalTx(*this))