Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show softfork status in getblockchaininfo #6353

Merged
merged 1 commit into from Jul 1, 2015

Conversation

@laanwj
Copy link
Member

laanwj commented Jun 29, 2015

  "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 added the RPC/REST/ZMQ label Jun 29, 2015
@laanwj laanwj force-pushed the laanwj:2015_06_softforkinfo branch Jun 29, 2015
@btcdrak
Copy link
Contributor

btcdrak commented Jun 29, 2015

Tested ACK

@petertodd
Copy link
Contributor

petertodd commented Jun 29, 2015

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
Copy link
Member Author

laanwj commented Jun 29, 2015

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
Copy link
Contributor

btcdrak commented Jun 29, 2015

@laanwj Sounds like a good solution.

@petertodd
Copy link
Contributor

petertodd commented Jun 29, 2015

@laanwj ACK that.

@laanwj laanwj force-pushed the laanwj:2015_06_softforkinfo branch Jun 29, 2015
@jtimon
Copy link
Member

jtimon commented Jun 29, 2015

ut ACK

@CodeShark
Copy link
Contributor

CodeShark commented Jul 1, 2015

tACK

@fanquake
fanquake reviewed Jul 1, 2015
View changes
src/rpcblockchain.cpp Outdated
@@ -469,6 +469,36 @@ UniValue verifychain(const UniValue& params, bool fHelp)
return CVerifyDB().VerifyDB(pcoinsTip, nCheckLevel, nCheckDepth);
}

/* Implementation of IsSuperMajority with better feedback */

This comment has been minimized.

Copy link
@fanquake

fanquake Jul 1, 2015

Member

nit: /**

This comment has been minimized.

Copy link
@laanwj

laanwj Jul 1, 2015

Author Member

Fixed

@fanquake
Copy link
Member

fanquake commented Jul 1, 2015

utACK

@laanwj laanwj force-pushed the laanwj:2015_06_softforkinfo branch to 5ed1079 Jul 1, 2015
@laanwj laanwj merged commit 5ed1079 into bitcoin:master Jul 1, 2015
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
laanwj added a commit that referenced this pull request Jul 1, 2015
5ed1079 Show softfork status in getblockchaininfo (Wladimir J. van der Laan)
@@ -501,6 +544,14 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
obj.push_back(Pair("verificationprogress", Checkpoints::GuessVerificationProgress(Params().Checkpoints(), chainActive.Tip())));
obj.push_back(Pair("chainwork", chainActive.Tip()->nChainWork.GetHex()));
obj.push_back(Pair("pruned", fPruneMode));

const Consensus::Params& consensusParams = Params().GetConsensus();

This comment has been minimized.

Copy link
@jonasschnelli

jonasschnelli Jul 20, 2015

Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.