@@ -801,10 +801,9 @@ static UniValue SoftForkDesc(const std::string &name, int version, CBlockIndex*
801801 return rv;
802802}
803803
804- static UniValue BIP9SoftForkDesc (const std::string& name, const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
804+ static UniValue BIP9SoftForkDesc (const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
805805{
806806 UniValue rv (UniValue::VOBJ);
807- rv.push_back (Pair (" id" , name));
808807 const ThresholdState thresholdState = VersionBitsTipState (consensusParams, id);
809808 switch (thresholdState) {
810809 case THRESHOLD_DEFINED: rv.push_back (Pair (" status" , " defined" )); break ;
@@ -853,15 +852,14 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
853852 " \" reject\" : { ... } (object) progress toward rejecting pre-softfork blocks (same fields as \" enforce\" )\n "
854853 " }, ...\n "
855854 " ],\n "
856- " \" bip9_softforks\" : [ (array) status of BIP9 softforks in progress\n "
857- " {\n "
858- " \" id\" : \" xxxx\" , (string) name of the softfork\n "
855+ " \" bip9_softforks\" : { (object) status of BIP9 softforks in progress\n "
856+ " \" xxxx\" : { (string) name of the softfork\n "
859857 " \" status\" : \" xxxx\" , (string) one of \" defined\" , \" started\" , \" lockedin\" , \" active\" , \" failed\"\n "
860858 " \" bit\" : xx, (numeric) the bit, 0-28, in the block version field used to signal this soft fork\n "
861859 " \" startTime\" : xx, (numeric) the minimum median time past of a block at which the bit gains its meaning\n "
862860 " \" timeout\" : xx (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in\n "
863861 " }\n "
864- " ] \n "
862+ " } \n "
865863 " }\n "
866864 " \n Examples:\n "
867865 + HelpExampleCli (" getblockchaininfo" , " " )
@@ -884,12 +882,12 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
884882 const Consensus::Params& consensusParams = Params ().GetConsensus ();
885883 CBlockIndex* tip = chainActive.Tip ();
886884 UniValue softforks (UniValue::VARR);
887- UniValue bip9_softforks (UniValue::VARR );
885+ UniValue bip9_softforks (UniValue::VOBJ );
888886 softforks.push_back (SoftForkDesc (" bip34" , 2 , tip, consensusParams));
889887 softforks.push_back (SoftForkDesc (" bip66" , 3 , tip, consensusParams));
890888 softforks.push_back (SoftForkDesc (" bip65" , 4 , tip, consensusParams));
891- bip9_softforks.push_back (BIP9SoftForkDesc (" csv" , consensusParams, Consensus::DEPLOYMENT_CSV));
892- bip9_softforks.push_back (BIP9SoftForkDesc (" dip0001" , consensusParams, Consensus::DEPLOYMENT_DIP0001));
889+ bip9_softforks.push_back (Pair (" csv" , BIP9SoftForkDesc ( consensusParams, Consensus::DEPLOYMENT_CSV) ));
890+ bip9_softforks.push_back (Pair (" dip0001" , BIP9SoftForkDesc ( consensusParams, Consensus::DEPLOYMENT_DIP0001) ));
893891 obj.push_back (Pair (" softforks" , softforks));
894892 obj.push_back (Pair (" bip9_softforks" , bip9_softforks));
895893
0 commit comments