aboutsummaryrefslogtreecommitdiff
path: root/src/consensus/consensus.h
AgeCommit message (Collapse)Author
2015-10-23Add rules--presently disabled--for using GetMedianTimePast as endpoint for ↵Mark Friedenbach
lock-time calculations The lock-time code currently uses CBlock::nTime as the cutoff point for time based locked transactions. This has the unfortunate outcome of creating a perverse incentive for miners to lie about the time of a block in order to collect more fees by including transactions that by wall clock determination have not yet matured. By using CBlockIndex::GetMedianTimePast from the prior block instead, the self-interested miner no longer gains from generating blocks with fraudulent timestamps. Users can compensate for this change by simply adding an hour (3600 seconds) to their time-based lock times. If enforced, this would be a soft-fork change. This commit only adds the functionality on an unexecuted code path, without changing the behaviour of Bitcoin Core.
2015-05-09Move LOCKTIME_THRESHOLD to src/script/script.hPeter Todd
Will now be needed by CHECKLOCKTIMEVERIFY code.
2015-04-20Consensus: Create consensus/consensus.h with some constantsjtimon