mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
versionbits: allow specific deployments to override the signalling/threshold values
This commit is contained in:
parent
787ee1e91f
commit
bec6bcf31b
2 changed files with 20 additions and 2 deletions
|
|
@ -180,8 +180,20 @@ private:
|
|||
protected:
|
||||
int64_t BeginTime(const Consensus::Params& params) const override { return params.vDeployments[id].nStartTime; }
|
||||
int64_t EndTime(const Consensus::Params& params) const override { return params.vDeployments[id].nTimeout; }
|
||||
int Period(const Consensus::Params& params) const override { return params.nMinerConfirmationWindow; }
|
||||
int Threshold(const Consensus::Params& params) const override { return params.nRuleChangeActivationThreshold; }
|
||||
int Period(const Consensus::Params& params) const override {
|
||||
if (params.vDeployments[id].nPeriod) {
|
||||
return *params.vDeployments[id].nPeriod;
|
||||
} else {
|
||||
return params.nMinerConfirmationWindow;
|
||||
}
|
||||
}
|
||||
int Threshold(const Consensus::Params& params) const override {
|
||||
if (params.vDeployments[id].nThreshold) {
|
||||
return *params.vDeployments[id].nThreshold;
|
||||
} else {
|
||||
return params.nRuleChangeActivationThreshold;
|
||||
}
|
||||
}
|
||||
|
||||
bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const override
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue