Skip to content
Browse files

Merge pull request #1717 from Diapolo/Qt_change_TX_display

Qt: show mined transactions at depth 1
  • Loading branch information...
2 parents 6cbae37 + f09e8fc commit bfc24bd4cee1c1da944dfd1f236b07e9194f493c @laanwj laanwj committed Sep 20, 2012
Showing with 3 additions and 13 deletions.
  1. +2 −12 src/qt/transactionrecord.cpp
  2. +1 −1 src/wallet.cpp
View
14 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;
}
View
2 src/wallet.cpp
@@ -960,7 +960,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);
}
}

0 comments on commit bfc24bd

Please sign in to comment.
Something went wrong with that request. Please try again.