aboutsummaryrefslogtreecommitdiff
path: root/src/miner.h
diff options
context:
space:
mode:
authorMark Friedenbach <mark@friedenbach.org>2015-05-22 14:49:50 -0700
committerMark Friedenbach <mark@friedenbach.org>2015-05-27 14:03:11 -0700
commitef8dfe41d1eba0de6d6554e25e658169f97313b5 (patch)
treefb269c424ccf2fe715c639df712dba7ae1cf34dc /src/miner.h
parentce56f5621a94dcc2159ebe57e43da727eab18e6c (diff)
Prevent block.nTime from decreasing
Under some circumstances it is possible for there to be a significant, discontinuous jump in a node's clock value. On mining nodes, this can result in block templates which are no longer valid due to time-based nLockTime constraints. UpdateTime() is modified so that it will never decrease a block's nLockTime, thereby preventing such invalidations.
Diffstat (limited to 'src/miner.h')
-rw-r--r--src/miner.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/miner.h b/src/miner.h
index 96a6b70ecd..d46f4b1f2d 100644
--- a/src/miner.h
+++ b/src/miner.h
@@ -30,6 +30,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn);
CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey);
/** Modify the extranonce in a block */
void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
-void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev);
+int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev);
#endif // BITCOIN_MINER_H