Add rules--presently disabled--for using GetMedianTimePast as endpoint for lock-time...
authorMark Friedenbach <mark@friedenbach.org>
Wed, 3 Jun 2015 19:55:45 +0000 (12:55 -0700)
committerBtcDrak <btcdrak@gmail.com>
Fri, 23 Oct 2015 20:33:31 +0000 (21:33 +0100)
commita1d3c6fb9de8a3fc3e36bc3753a6831cb1dfdbcb
treec1e715d570a58016ced625d97cf7cb9e95b06485
parentdfe55bdc32b5333dcce1a7f2c74628f64028d1fe
Add rules--presently disabled--for using GetMedianTimePast as endpoint for 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.
src/consensus/consensus.h
src/main.cpp
src/main.h
src/miner.cpp
This page took 0.027211 seconds and 4 git commands to generate.