diff options
author | Mark Friedenbach <mark@friedenbach.org> | 2015-06-03 12:55:45 -0700 |
---|---|---|
committer | Mark Friedenbach <mark@friedenbach.org> | 2015-10-23 09:02:24 -0700 |
commit | 9d55050773d57c0e12005e524f2e54d9e622c6e2 (patch) | |
tree | 5e07889ff64f153d39b0a4b06d5e2ac29621153f /src/test | |
parent | 46f74379b86be982b121bcb8c3cfe07fa80bffd0 (diff) | |
download | bitcoin-9d55050773d57c0e12005e524f2e54d9e622c6e2.tar.xz |
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.
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions