1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-05-12 12:03:29 +00:00

Formatting feedback & copyright from btcdrak.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2015-09-25 10:57:56 +09:30
parent be86444b88
commit fecfe5bfac

View File

@ -1,3 +1,4 @@
<pre>
BIP: ??
Title: Version bits with timeout and delay
Author: Pieter Wuille <pieter.wuille@gmail.com>, Peter Todd <pete@petertodd.org>, Greg Maxwell <greg@xiph.org>, Rusty Russell <rusty@rustcorp.com.au>
@ -36,7 +37,7 @@ retarget period.
Software which supports the change should begin by setting B in all blocks
mined until it is resolved.
<nowiki>if (BState == defined) {
if (BState == defined) {
SetBInBlock();
}
@ -45,7 +46,7 @@ If bit B is set in 1916 (1512 on testnet) or
more of the 2016 blocks within a retarget period, it is considered
''locked-in''. Miners should stop setting bit B.
<nowiki>if (NextBlockHeight % 2016 == 0) {
if (NextBlockHeight % 2016 == 0) {
if (BState == defined && Previous2016BlocksCountB() >= 1916) {
BState = locked-in;
BActiveHeight = NextBlockHeight + 2016;
@ -58,7 +59,7 @@ the second retarget period; ie. there is a one retarget period in
which the remaining 5% can upgrade. At the that activation block and
after, the bit B may be reused for a different soft fork.
<nowiki>if (BState == locked-in && NextBlockHeight == BActiveHeight) {
if (BState == locked-in && NextBlockHeight == BActiveHeight) {
BState = activated;
ApplyRulesForBFromNextBlock();
/* B can be reused, immediately */
@ -120,7 +121,7 @@ If the soft fork still not ''locked-in'' and the
GetMedianTimePast() of a block following a retarget period is at or
past this timeout, miners should cease setting this bit.
<nowiki>if (NextBlockHeight % 2016 == 0) {
if (NextBlockHeight % 2016 == 0) {
if (BState == defined && GetMedianTimePast(nextblock) >= BFinalYear) {
BState = failed;
}
@ -160,3 +161,7 @@ enough failed proposals to cause a bit shortage.
The fallow period at the conclusion of a soft fork attempt allows some
detection of buggy clients, and allows time for warnings and software
upgrades for successful soft forks.
==Copyright==
This document is placed in the public domain.