Skip to content

Show softfork status in getblockchaininfo - #6353

Merged
laanwj merged 1 commit into
bitcoin:masterfrom
laanwj:2015_06_softforkinfo
Jul 1, 2015
Merged

laanwj merged 1 commit into
bitcoin:masterfrom
laanwj:2015_06_softforkinfo

Conversation

@laanwj

@laanwj laanwj commented Jun 29, 2015

Copy link
Copy Markdown
Member
  "softforks": [            (array) status of softforks in progress
     {
        "id": "xxxx",        (string) name of softfork
        "version": xx,         (numeric) block version
        "enforce": {           (object) progress toward enforcing the softfork rules
           "status": xx,       (boolean) true if threshold reached
           "found": xx,        (numeric) number of blocks with the new version found
           "required": xx,     (numeric) number of blocks required to trigger
           "window": xx,       (numeric) size of examined window of recent blocks
        },
        "reject": { ... }      (object) progress toward rejecting pre-softfork blocks (same fields as for "enforce")
     }, ...
  ]

@laanwj
laanwj force-pushed the 2015_06_softforkinfo branch from 2aca65e to 45d796c Compare June 29, 2015 07:51
@btcdrak

btcdrak commented Jun 29, 2015

Copy link
Copy Markdown
Contributor

Tested ACK

@petertodd

Copy link
Copy Markdown
Contributor

Tested ACK.

One minor nit is the way the "found" bit caps out at found==required. I think removing the "&& nFound < nRequired" clause in the for loop should be safe; the nFound > nRequired part at the end should never be triggered. But just documenting it would be safer.

@laanwj

laanwj commented Jun 29, 2015

Copy link
Copy Markdown
Member Author

One minor nit is the way the "found" bit caps out at found==required. I think removing the "&& nFound < nRequired" clause in the for loop should be safe; the nFound > nRequired part at the end should never be triggered. But just documenting it would be safer.

I've thought about cloning the IsSuperMajority in rpcblockhain.cpp, with that change, leaving the original one as-is. It is only a few lines. Then it also doesn't need to be exported from main anymore.

@btcdrak

btcdrak commented Jun 29, 2015

Copy link
Copy Markdown
Contributor

@laanwj Sounds like a good solution.

@petertodd

Copy link
Copy Markdown
Contributor

@laanwj ACK that.

@laanwj
laanwj force-pushed the 2015_06_softforkinfo branch from a77221c to f168e66 Compare June 29, 2015 09:35
@jtimon

jtimon commented Jun 29, 2015

Copy link
Copy Markdown
Contributor

ut ACK

@CodeShark

Copy link
Copy Markdown
Contributor

tACK

Comment thread src/rpcblockchain.cpp Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: /**

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@fanquake

fanquake commented Jul 1, 2015

Copy link
Copy Markdown
Member

utACK

@laanwj
laanwj force-pushed the 2015_06_softforkinfo branch from f168e66 to 5ed1079 Compare July 1, 2015 17:36
@laanwj
laanwj merged commit 5ed1079 into bitcoin:master Jul 1, 2015
laanwj added a commit that referenced this pull request Jul 1, 2015
5ed1079 Show softfork status in getblockchaininfo (Wladimir J. van der Laan)
Comment thread src/rpcblockchain.cpp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we have the soft fork states between pruned and prunehight which looks a bit sandwiched.

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants