diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-01 11:30:20 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-01 11:33:33 +0200 |
commit | 87550eefc1131132e940efcaf296bb399eeb02df (patch) | |
tree | 29feaceee6f4f0aa73bf2dba0ab8698e73a6aced /src/miner.cpp | |
parent | 8d05ec7bda41a720da16901c510b4cb75e6ab558 (diff) | |
parent | 28bf06236d3b385e95fe26a7a742395b30efd6ee (diff) |
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.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 7a57b42e30..dfabfd48d0 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; |