@@ -1430,7 +1430,7 @@ static RPCHelpMan verifychain()
1430
1430
};
1431
1431
}
1432
1432
1433
- static void SoftForkDescPushBack (const CBlockIndex* active_chain_tip , UniValue& softforks, const Consensus::Params& params, Consensus::BuriedDeployment dep)
1433
+ static void SoftForkDescPushBack (const CBlockIndex* blockindex , UniValue& softforks, const Consensus::Params& params, Consensus::BuriedDeployment dep)
1434
1434
{
1435
1435
// For buried deployments.
1436
1436
@@ -1440,17 +1440,17 @@ static void SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniValue&
1440
1440
rv.pushKV (" type" , " buried" );
1441
1441
// getdeploymentinfo reports the softfork as active from when the chain height is
1442
1442
// one below the activation height
1443
- rv.pushKV (" active" , DeploymentActiveAfter (active_chain_tip , params, dep));
1443
+ rv.pushKV (" active" , DeploymentActiveAfter (blockindex , params, dep));
1444
1444
rv.pushKV (" height" , params.DeploymentHeight (dep));
1445
1445
softforks.pushKV (DeploymentName (dep), rv);
1446
1446
}
1447
1447
1448
- static void SoftForkDescPushBack (const CBlockIndex* active_chain_tip , UniValue& softforks, const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
1448
+ static void SoftForkDescPushBack (const CBlockIndex* blockindex , UniValue& softforks, const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
1449
1449
{
1450
1450
// For BIP9 deployments.
1451
1451
1452
1452
if (!DeploymentEnabled (consensusParams, id)) return ;
1453
- if (active_chain_tip == nullptr ) return ;
1453
+ if (blockindex == nullptr ) return ;
1454
1454
1455
1455
auto get_state_name = [](const ThresholdState state) -> std::string {
1456
1456
switch (state) {
@@ -1465,8 +1465,8 @@ static void SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniValue&
1465
1465
1466
1466
UniValue bip9 (UniValue::VOBJ);
1467
1467
1468
- const ThresholdState next_state = g_versionbitscache.State (active_chain_tip , consensusParams, id);
1469
- const ThresholdState current_state = g_versionbitscache.State (active_chain_tip ->pprev , consensusParams, id);
1468
+ const ThresholdState next_state = g_versionbitscache.State (blockindex , consensusParams, id);
1469
+ const ThresholdState current_state = g_versionbitscache.State (blockindex ->pprev , consensusParams, id);
1470
1470
1471
1471
const bool has_signal = (ThresholdState::STARTED == current_state || ThresholdState::LOCKED_IN == current_state);
1472
1472
@@ -1480,14 +1480,14 @@ static void SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniValue&
1480
1480
1481
1481
// BIP9 status
1482
1482
bip9.pushKV (" status" , get_state_name (current_state));
1483
- bip9.pushKV (" since" , g_versionbitscache.StateSinceHeight (active_chain_tip ->pprev , consensusParams, id));
1483
+ bip9.pushKV (" since" , g_versionbitscache.StateSinceHeight (blockindex ->pprev , consensusParams, id));
1484
1484
bip9.pushKV (" status-next" , get_state_name (next_state));
1485
1485
1486
1486
// BIP9 signalling status, if applicable
1487
1487
if (has_signal) {
1488
1488
UniValue statsUV (UniValue::VOBJ);
1489
1489
std::vector<bool > signals;
1490
- BIP9Stats statsStruct = g_versionbitscache.Statistics (active_chain_tip , consensusParams, id, &signals);
1490
+ BIP9Stats statsStruct = g_versionbitscache.Statistics (blockindex , consensusParams, id, &signals);
1491
1491
statsUV.pushKV (" period" , statsStruct.period );
1492
1492
statsUV.pushKV (" elapsed" , statsStruct.elapsed );
1493
1493
statsUV.pushKV (" count" , statsStruct.count );
@@ -1508,7 +1508,7 @@ static void SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniValue&
1508
1508
UniValue rv (UniValue::VOBJ);
1509
1509
rv.pushKV (" type" , " bip9" );
1510
1510
if (ThresholdState::ACTIVE == next_state) {
1511
- rv.pushKV (" height" , g_versionbitscache.StateSinceHeight (active_chain_tip , consensusParams, id));
1511
+ rv.pushKV (" height" , g_versionbitscache.StateSinceHeight (blockindex , consensusParams, id));
1512
1512
}
1513
1513
rv.pushKV (" active" , ThresholdState::ACTIVE == next_state);
1514
1514
rv.pushKV (" bip9" , bip9);
@@ -1636,16 +1636,16 @@ const std::vector<RPCResult> RPCHelpForDeployment{
1636
1636
}},
1637
1637
};
1638
1638
1639
- UniValue DeploymentInfo (const CBlockIndex* tip , const Consensus::Params& consensusParams)
1639
+ UniValue DeploymentInfo (const CBlockIndex* blockindex , const Consensus::Params& consensusParams)
1640
1640
{
1641
1641
UniValue softforks (UniValue::VOBJ);
1642
- SoftForkDescPushBack (tip , softforks, consensusParams, Consensus::DEPLOYMENT_HEIGHTINCB);
1643
- SoftForkDescPushBack (tip , softforks, consensusParams, Consensus::DEPLOYMENT_DERSIG);
1644
- SoftForkDescPushBack (tip , softforks, consensusParams, Consensus::DEPLOYMENT_CLTV);
1645
- SoftForkDescPushBack (tip , softforks, consensusParams, Consensus::DEPLOYMENT_CSV);
1646
- SoftForkDescPushBack (tip , softforks, consensusParams, Consensus::DEPLOYMENT_SEGWIT);
1647
- SoftForkDescPushBack (tip , softforks, consensusParams, Consensus::DEPLOYMENT_TESTDUMMY);
1648
- SoftForkDescPushBack (tip , softforks, consensusParams, Consensus::DEPLOYMENT_TAPROOT);
1642
+ SoftForkDescPushBack (blockindex , softforks, consensusParams, Consensus::DEPLOYMENT_HEIGHTINCB);
1643
+ SoftForkDescPushBack (blockindex , softforks, consensusParams, Consensus::DEPLOYMENT_DERSIG);
1644
+ SoftForkDescPushBack (blockindex , softforks, consensusParams, Consensus::DEPLOYMENT_CLTV);
1645
+ SoftForkDescPushBack (blockindex , softforks, consensusParams, Consensus::DEPLOYMENT_CSV);
1646
+ SoftForkDescPushBack (blockindex , softforks, consensusParams, Consensus::DEPLOYMENT_SEGWIT);
1647
+ SoftForkDescPushBack (blockindex , softforks, consensusParams, Consensus::DEPLOYMENT_TESTDUMMY);
1648
+ SoftForkDescPushBack (blockindex , softforks, consensusParams, Consensus::DEPLOYMENT_TAPROOT);
1649
1649
return softforks;
1650
1650
}
1651
1651
} // anon namespace
@@ -1673,24 +1673,24 @@ static RPCHelpMan getdeploymentinfo()
1673
1673
LOCK (cs_main);
1674
1674
const CChainState& active_chainstate = chainman.ActiveChainstate ();
1675
1675
1676
- const CBlockIndex* tip ;
1676
+ const CBlockIndex* blockindex ;
1677
1677
if (request.params [0 ].isNull ()) {
1678
- tip = active_chainstate.m_chain .Tip ();
1679
- CHECK_NONFATAL (tip );
1678
+ blockindex = active_chainstate.m_chain .Tip ();
1679
+ CHECK_NONFATAL (blockindex );
1680
1680
} else {
1681
1681
const uint256 hash (ParseHashV (request.params [0 ], " blockhash" ));
1682
- tip = chainman.m_blockman .LookupBlockIndex (hash);
1683
- if (!tip ) {
1682
+ blockindex = chainman.m_blockman .LookupBlockIndex (hash);
1683
+ if (!blockindex ) {
1684
1684
throw JSONRPCError (RPC_INVALID_ADDRESS_OR_KEY, " Block not found" );
1685
1685
}
1686
1686
}
1687
1687
1688
1688
const Consensus::Params& consensusParams = Params ().GetConsensus ();
1689
1689
1690
1690
UniValue deploymentinfo (UniValue::VOBJ);
1691
- deploymentinfo.pushKV (" hash" , tip ->GetBlockHash ().ToString ());
1692
- deploymentinfo.pushKV (" height" , tip ->nHeight );
1693
- deploymentinfo.pushKV (" deployments" , DeploymentInfo (tip , consensusParams));
1691
+ deploymentinfo.pushKV (" hash" , blockindex ->GetBlockHash ().ToString ());
1692
+ deploymentinfo.pushKV (" height" , blockindex ->nHeight );
1693
+ deploymentinfo.pushKV (" deployments" , DeploymentInfo (blockindex , consensusParams));
1694
1694
return deploymentinfo;
1695
1695
},
1696
1696
};
0 commit comments