OSDN Git Service

If requested, actually treat uncomfirmed change as being uncomfirmed
authormonacoinproject <monacoinproject@gmail.com>
Sun, 6 Apr 2014 15:39:00 +0000 (00:39 +0900)
committermonacoinproject <monacoinproject@gmail.com>
Sun, 6 Apr 2014 15:39:00 +0000 (00:39 +0900)
This commit strengthens 1bbca24 by updating the CWalletTx::IsConfirmed()
function.

If (bSpendZeroConfChange==false), then IsConfirmed() should actually
treat unconfirmed change as being unconfirmed.

src/wallet.h

index d7e5c56..b2cf752 100644 (file)
@@ -646,7 +646,7 @@ public:
             return false;
         if (GetDepthInMainChain() >= 1)
             return true;
-        if (!IsFromMe()) // using wtx's cached debit
+        if (!bSpendZeroConfChange || !IsFromMe()) // using wtx's cached debit
             return false;
 
         // If no confirmations but it's from us, we can still