Show softfork status in getblockchaininfo #6353

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2015_06_softforkinfo changing 1 files +51 −0
  1. laanwj commented at 7:49 AM on June 29, 2015: 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")
         }, ...
      ]
    
  2. laanwj added the label RPC on Jun 29, 2015
  3. laanwj force-pushed on Jun 29, 2015
  4. btcdrak commented at 8:41 AM on June 29, 2015: contributor

    Tested ACK

  5. petertodd commented at 8:44 AM on June 29, 2015: 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.

  6. laanwj commented at 8:49 AM on June 29, 2015: member

    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.

  7. btcdrak commented at 8:51 AM on June 29, 2015: contributor

    @laanwj Sounds like a good solution.

  8. petertodd commented at 8:56 AM on June 29, 2015: contributor

    @laanwj ACK that.

  9. laanwj force-pushed on Jun 29, 2015
  10. jtimon referenced this in commit f168e66c18 on Jun 29, 2015
  11. jtimon commented at 9:46 AM on June 29, 2015: contributor

    ut ACK

  12. CodeShark commented at 5:23 AM on July 1, 2015: contributor

    tACK

  13. in src/rpcblockchain.cpp:None in f168e66c18 outdated
     468 | @@ -469,6 +469,36 @@ UniValue verifychain(const UniValue& params, bool fHelp)
     469 |      return CVerifyDB().VerifyDB(pcoinsTip, nCheckLevel, nCheckDepth);
     470 |  }
     471 |  
     472 | +/* Implementation of IsSuperMajority with better feedback */
    


    fanquake commented at 7:07 AM on July 1, 2015:

    nit: /**


    laanwj commented at 5:36 PM on July 1, 2015:

    Fixed

  14. fanquake commented at 7:07 AM on July 1, 2015: member

    utACK

  15. Show softfork status in getblockchaininfo 5ed10793c2
  16. laanwj force-pushed on Jul 1, 2015
  17. laanwj merged this on Jul 1, 2015
  18. laanwj closed this on Jul 1, 2015

  19. laanwj referenced this in commit 6bcb0a21c5 on Jul 1, 2015
  20. in src/rpcblockchain.cpp:None in 5ed10793c2
     543 | @@ -501,6 +544,14 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
     544 |      obj.push_back(Pair("verificationprogress",  Checkpoints::GuessVerificationProgress(Params().Checkpoints(), chainActive.Tip())));
     545 |      obj.push_back(Pair("chainwork",             chainActive.Tip()->nChainWork.GetHex()));
     546 |      obj.push_back(Pair("pruned",                fPruneMode));
     547 | +
     548 | +    const Consensus::Params& consensusParams = Params().GetConsensus();
    


    jonasschnelli commented at 7:25 AM on July 20, 2015:

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

  21. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me