Allow passing branchId when calling signrawtransaction
This commit is contained in:
@@ -82,6 +82,15 @@ uint32_t CurrentEpochBranchId(int nHeight, const Consensus::Params& params) {
|
||||
return NetworkUpgradeInfo[CurrentEpoch(nHeight, params)].nBranchId;
|
||||
}
|
||||
|
||||
bool IsConsensusBranchId(int branchId) {
|
||||
for (int idx = Consensus::BASE_SPROUT; idx < Consensus::MAX_NETWORK_UPGRADES; idx++) {
|
||||
if (branchId == NetworkUpgradeInfo[idx].nBranchId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsActivationHeight(
|
||||
int nHeight,
|
||||
const Consensus::Params& params,
|
||||
|
||||
@@ -63,6 +63,12 @@ int CurrentEpoch(int nHeight, const Consensus::Params& params);
|
||||
*/
|
||||
uint32_t CurrentEpochBranchId(int nHeight, const Consensus::Params& params);
|
||||
|
||||
/**
|
||||
* Returns true if a given branch id is a valid nBranchId for one of the network
|
||||
* upgrades contained in NetworkUpgradeInfo.
|
||||
*/
|
||||
bool IsConsensusBranchId(int branchId);
|
||||
|
||||
/**
|
||||
* Returns true if the given block height is the activation height for the given
|
||||
* upgrade.
|
||||
|
||||
Reference in New Issue
Block a user