PPCoin: Fix merge mistake on connecting coinstake since commit 0561bbd
authorScott Nadal <scott.nadal@gmail.com>
Tue, 24 Jul 2012 14:30:11 +0000 (15:30 +0100)
committerScott Nadal <scott.nadal@gmail.com>
Tue, 24 Jul 2012 14:30:11 +0000 (15:30 +0100)
src/main.cpp

index e99e95f..7790c58 100644 (file)
@@ -1380,7 +1380,7 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex)
         nTxPos += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION);
 
         MapPrevTx mapInputs;
-        if (!(tx.IsCoinBase() || tx.IsCoinStake()))
+        if (!tx.IsCoinBase())
         {
             bool fInvalid;
             if (!tx.FetchInputs(txdb, mapQueuedChanges, true, false, mapInputs, fInvalid))
@@ -1396,7 +1396,8 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex)
                     return DoS(100, error("ConnectBlock() : too many sigops"));
             }
 
-            nFees += tx.GetValueIn(mapInputs)-tx.GetValueOut();
+            if (!tx.IsCoinStake())
+                nFees += tx.GetValueIn(mapInputs)-tx.GetValueOut();
 
             if (!tx.ConnectInputs(txdb, mapInputs, mapQueuedChanges, posThisTx, pindex, true, false, fStrictPayToScriptHash))
                 return false;