mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
rpc: style: Improve BuriedForkDescPushBack signature
This commit is contained in:
parent
f99913969f
commit
bc3bd36902
1 changed files with 4 additions and 4 deletions
|
@ -1240,21 +1240,21 @@ static RPCHelpMan verifychain()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BuriedForkDescPushBack(UniValue& softforks, const std::string &name, int height, int active_tip_nheight) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
static void BuriedForkDescPushBack(UniValue& softforks, const std::string &name, int softfork_height, int tip_height) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
||||||
{
|
{
|
||||||
// For buried deployments.
|
// For buried deployments.
|
||||||
// A buried deployment is one where the height of the activation has been hardcoded into
|
// A buried deployment is one where the height of the activation has been hardcoded into
|
||||||
// the client implementation long after the consensus change has activated. See BIP 90.
|
// the client implementation long after the consensus change has activated. See BIP 90.
|
||||||
// Buried deployments with activation height value of
|
// Buried deployments with activation height value of
|
||||||
// std::numeric_limits<int>::max() are disabled and thus hidden.
|
// std::numeric_limits<int>::max() are disabled and thus hidden.
|
||||||
if (height == std::numeric_limits<int>::max()) return;
|
if (softfork_height == std::numeric_limits<int>::max()) return;
|
||||||
|
|
||||||
UniValue rv(UniValue::VOBJ);
|
UniValue rv(UniValue::VOBJ);
|
||||||
rv.pushKV("type", "buried");
|
rv.pushKV("type", "buried");
|
||||||
// getblockchaininfo reports the softfork as active from when the chain height is
|
// getblockchaininfo reports the softfork as active from when the chain height is
|
||||||
// one below the activation height
|
// one below the activation height
|
||||||
rv.pushKV("active", active_tip_nheight + 1 >= height);
|
rv.pushKV("active", tip_height + 1 >= softfork_height);
|
||||||
rv.pushKV("height", height);
|
rv.pushKV("height", softfork_height);
|
||||||
softforks.pushKV(name, rv);
|
softforks.pushKV(name, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue