aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-06-01 11:30:20 +0200
committerWladimir J. van der Laan <[email protected]>2015-06-01 11:33:33 +0200
commit87550eefc1131132e940efcaf296bb399eeb02df (patch)
tree29feaceee6f4f0aa73bf2dba0ab8698e73a6aced /src/miner.cpp
parentMerge pull request #6164 (diff)
parentFix off-by-one error w/ nLockTime in the wallet (diff)
downloaddiscoin-87550eefc1131132e940efcaf296bb399eeb02df.tar.xz
discoin-87550eefc1131132e940efcaf296bb399eeb02df.zip
Merge pull request #6183
28bf062 Fix off-by-one error w/ nLockTime in the wallet (Peter Todd)
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index 7a57b42e3..dfabfd48d 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -138,6 +138,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
LOCK2(cs_main, mempool.cs);
CBlockIndex* pindexPrev = chainActive.Tip();
const int nHeight = pindexPrev->nHeight + 1;
+ pblock->nTime = GetAdjustedTime();
CCoinsViewCache view(pcoinsTip);
// Priority order to process transactions
@@ -152,7 +153,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
mi != mempool.mapTx.end(); ++mi)
{
const CTransaction& tx = mi->second.GetTx();
- if (tx.IsCoinBase() || !IsFinalTx(tx, nHeight))
+ if (tx.IsCoinBase() || !IsFinalTx(tx, nHeight, pblock->nTime))
continue;
COrphan* porphan = NULL;