mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
fix!: Rotation members calc v19 (#5142)
With 18.2, block `0000000000000044356e582f9748f9baf084e5b7946e6386b32620d540830fda` is marked invalid with `bad-qc-invalid`. ## Issue being fixed or feature implemented While the 19 isn’t active -> Calculate rotation members based on 18.1 code Once 19 active -> Calculate rotation members based on 18.2 code ## What was done? ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone
This commit is contained in:
parent
60946b660c
commit
5eab2ce0ed
@ -256,9 +256,11 @@ std::vector<std::vector<CDeterministicMNCPtr>> BuildNewQuorumQuarterMembers(cons
|
|||||||
auto MnsNotUsedAtH = CDeterministicMNList();
|
auto MnsNotUsedAtH = CDeterministicMNList();
|
||||||
std::vector<CDeterministicMNList> MnsUsedAtHIndexed(nQuorums);
|
std::vector<CDeterministicMNList> MnsUsedAtHIndexed(nQuorums);
|
||||||
|
|
||||||
|
bool skipRemovedMNs = IsV19Active(pQuorumBaseBlockIndex) || (Params().NetworkIDString() == CBaseChainParams::TESTNET);
|
||||||
|
|
||||||
for (auto i = 0; i < nQuorums; ++i) {
|
for (auto i = 0; i < nQuorums; ++i) {
|
||||||
for (const auto& mn : previousQuarters.quarterHMinusC[i]) {
|
for (const auto& mn : previousQuarters.quarterHMinusC[i]) {
|
||||||
if (!allMns.HasMN(mn->proTxHash)) {
|
if (skipRemovedMNs && !allMns.HasMN(mn->proTxHash)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (allMns.IsMNPoSeBanned(mn->proTxHash)) {
|
if (allMns.IsMNPoSeBanned(mn->proTxHash)) {
|
||||||
@ -274,7 +276,7 @@ std::vector<std::vector<CDeterministicMNCPtr>> BuildNewQuorumQuarterMembers(cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const auto& mn : previousQuarters.quarterHMinus2C[i]) {
|
for (const auto& mn : previousQuarters.quarterHMinus2C[i]) {
|
||||||
if (!allMns.HasMN(mn->proTxHash)) {
|
if (skipRemovedMNs && !allMns.HasMN(mn->proTxHash)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (allMns.IsMNPoSeBanned(mn->proTxHash)) {
|
if (allMns.IsMNPoSeBanned(mn->proTxHash)) {
|
||||||
@ -290,7 +292,7 @@ std::vector<std::vector<CDeterministicMNCPtr>> BuildNewQuorumQuarterMembers(cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const auto& mn : previousQuarters.quarterHMinus3C[i]) {
|
for (const auto& mn : previousQuarters.quarterHMinus3C[i]) {
|
||||||
if (!allMns.HasMN(mn->proTxHash)) {
|
if (skipRemovedMNs && !allMns.HasMN(mn->proTxHash)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (allMns.IsMNPoSeBanned(mn->proTxHash)) {
|
if (allMns.IsMNPoSeBanned(mn->proTxHash)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user