Fix timestamp violation
authoralex <alex@alex-VirtualBox.(none)>
Sun, 19 Jan 2014 00:02:31 +0000 (04:02 +0400)
committeralex <alex@alex-VirtualBox.(none)>
Sun, 19 Jan 2014 00:02:31 +0000 (04:02 +0400)
src/main.cpp
src/miner.cpp

index a65b31f..e226e4a 100644 (file)
@@ -1364,7 +1364,7 @@ bool CTransaction::UpdateCoins(CCoinsView &inputs, CTxUndo &txundo, int nHeight,
 
 bool CTransaction::HaveInputs(CCoinsView &inputs) const
 {
-    if (!IsCoinBase()) { 
+    if (!IsCoinBase()) {
         // first check whether information about the prevout hash is available
         for (unsigned int i = 0; i < vin.size(); i++) {
             const COutPoint &prevout = vin[i].prevout;
index 7c494fa..f9d23cb 100644 (file)
@@ -306,13 +306,16 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake)
             if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS)
                 continue;
 
+/*
+ * We need to call UpdateCoins using actual block timestamp, so don't perform this here.
+ *
             CTxUndo txundo;
             if (!tx.UpdateCoins(viewTemp, txundo, pindexPrev->nHeight+1, pblock->nTime))
                 continue;
 
             // push changes from the second layer cache to the first one
             viewTemp.Flush();
-
+*/
             // Added
             pblock->vtx.push_back(tx);
             nBlockSize += nTxSize;