@@ -1107,13 +1107,13 @@ static UniValue BIP9SoftForkDesc(const Consensus::Params& consensusParams, Conse
1107
1107
return rv;
1108
1108
}
1109
1109
1110
- void BIP9SoftForkDescPushBack (UniValue& bip9_softforks, const std::string &name, const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
1110
+ void BIP9SoftForkDescPushBack (UniValue& bip9_softforks, const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
1111
1111
{
1112
1112
// Deployments with timeout value of 0 are hidden.
1113
1113
// A timeout value of 0 guarantees a softfork will never be activated.
1114
1114
// This is used when softfork codes are merged without specifying the deployment schedule.
1115
1115
if (consensusParams.vDeployments [id].nTimeout > 0 )
1116
- bip9_softforks.push_back (Pair (name, BIP9SoftForkDesc (consensusParams, id)));
1116
+ bip9_softforks.push_back (Pair (VersionBitsDeploymentInfo[id]. name , BIP9SoftForkDesc (consensusParams, id)));
1117
1117
}
1118
1118
1119
1119
UniValue getblockchaininfo (const JSONRPCRequest& request)
@@ -1185,8 +1185,9 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
1185
1185
softforks.push_back (SoftForkDesc (" bip34" , 2 , tip, consensusParams));
1186
1186
softforks.push_back (SoftForkDesc (" bip66" , 3 , tip, consensusParams));
1187
1187
softforks.push_back (SoftForkDesc (" bip65" , 4 , tip, consensusParams));
1188
- BIP9SoftForkDescPushBack (bip9_softforks, " csv" , consensusParams, Consensus::DEPLOYMENT_CSV);
1189
- BIP9SoftForkDescPushBack (bip9_softforks, " segwit" , consensusParams, Consensus::DEPLOYMENT_SEGWIT);
1188
+ for (int pos = Consensus::DEPLOYMENT_CSV; pos != Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++pos) {
1189
+ BIP9SoftForkDescPushBack (bip9_softforks, consensusParams, static_cast <Consensus::DeploymentPos>(pos));
1190
+ }
1190
1191
obj.push_back (Pair (" softforks" , softforks));
1191
1192
obj.push_back (Pair (" bip9_softforks" , bip9_softforks));
1192
1193
0 commit comments