aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-08-24 08:19:27 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-08-24 08:52:12 +0200
commitf09e8fcd33f7f1b1f4e20f2148bbf919b97db0c4 (patch)
tree7064f8ef83a5496101e9e6034fcaad5edd9e32c1
parent0050cf21ce2a3a3c032817e661f813ccaf25f430 (diff)
Qt: show mined transactions at depth 1
- before, we used to show them in GUI when depth >= 2, which could lead to confusion of users, as the RPC behaviour already showed the Tx
-rw-r--r--src/qt/transactionrecord.cpp14
-rw-r--r--src/wallet.cpp2
2 files changed, 3 insertions, 13 deletions
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index cc60e2732b..4c3071984f 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -9,18 +9,8 @@ bool TransactionRecord::showTransaction(const CWalletTx &wtx)
{
if (wtx.IsCoinBase())
{
- // Don't show generated coin until confirmed by at least one block after it
- // so we don't get the user's hopes up until it looks like it's probably accepted.
- //
- // It is not an error when generated blocks are not accepted. By design,
- // some percentage of blocks, like 10% or more, will end up not accepted.
- // This is the normal mechanism by which the network copes with latency.
- //
- // We display regular transactions right away before any confirmation
- // because they can always get into some block eventually. Generated coins
- // are special because if their block is not accepted, they are not valid.
- //
- if (wtx.GetDepthInMainChain() < 2)
+ // Ensures we show generated coins / mined transactions at depth 1
+ if (!wtx.IsInMainChain())
{
return false;
}
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 5ca501b1af..9b472cd78f 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -953,7 +953,7 @@ int64 CWallet::GetImmatureBalance() const
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx& pcoin = (*it).second;
- if (pcoin.IsCoinBase() && pcoin.GetBlocksToMaturity() > 0 && pcoin.GetDepthInMainChain() >= 2)
+ if (pcoin.IsCoinBase() && pcoin.GetBlocksToMaturity() > 0 && pcoin.IsInMainChain())
nTotal += GetCredit(pcoin);
}
}