Skip to content

Commit cdde1b2

Browse files
Merge #6961: fix: correct BLS scheme setting in MigrateLegacyDiffs() when nVersion is present
65c33ea fix: correct BLS scheme setting in `MigrateLegacyDiffs()` when `nVersion` is present (UdjinM6) Pull request description: ## Issue being fixed or feature implemented BLS public key legacy scheme is only being set when `nVersion` field is missing and needed to be auto-filled, instead of being set whenever a `pubKeyOperator` field is present. ## What was done? Moved the `SetLegacy()` call outside the `nVersion` check. ## How Has This Been Tested? Migrate on mainnet at block 2367886 ## Breaking Changes n/a ## Checklist: - [ ] 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 - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: kwvg: utACK 65c33ea Tree-SHA512: e68bc9ae9dc8fa0c780b64225ea1b9be10c1a097dd10cbc5d7d91a6e84ac0ffb75c37dd2b7bd60e7e93f25b8c395e74054b9e2360f3ea549b9e293fd2308e15e
2 parents 38baa5f + 65c33ea commit cdde1b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/evo/deterministicmns.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,9 +1496,9 @@ bool CDeterministicMNManager::MigrateLegacyDiffs(const CBlockIndex* const tip_in
14961496
stateDiff.fields |= CDeterministicMNStateDiff::Field_nVersion;
14971497
stateDiff.state.nVersion = dmn->pdmnState->nVersion;
14981498
}
1499-
if (stateDiff.fields & CDeterministicMNStateDiff::Field_pubKeyOperator) {
1500-
stateDiff.state.pubKeyOperator.SetLegacy(stateDiff.state.nVersion == ProTxVersion::LegacyBLS);
1501-
}
1499+
}
1500+
if (stateDiff.fields & CDeterministicMNStateDiff::Field_pubKeyOperator) {
1501+
stateDiff.state.pubKeyOperator.SetLegacy(stateDiff.state.nVersion == ProTxVersion::LegacyBLS);
15021502
}
15031503
convertedDiff.updatedMNs.emplace(internalId, stateDiff);
15041504
}

0 commit comments

Comments
 (0)