Skip to content

Commit 996cc4c

Browse files
Merge dashpay#6767: fix: partially revert 6730
b0416e2 fix: we must always build new mn lists from blocks once dip0003 is active (UdjinM6) Pull request description: ## Issue being fixed or feature implemented dashpay@1011f6b broke `develop` - can't sync from genesis or reindex atm. The reason is that `opt_cbTx == nullopt` below `assumevalid` but we must always build/process mn lists after dip0003 activation. ## What was done? Partially revert that commit. I'm keeping it small intentionally, will refactor in a follow-up PR. ## How Has This Been Tested? reindex, sync from scratch ## 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: knst: utACK b0416e2 PastaPastaPasta: utACK b0416e2 Tree-SHA512: 958a6282c404f0adb18c7f8e7110544e564a3df7228023930c59adfc8930bf826e8aff73c507950ef9032fcda9c955332b48939ca7e4d280b6b0ff5f15821ea9
2 parents 54c5f63 + b0416e2 commit 996cc4c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/evo/specialtxman.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,8 @@ bool CSpecialTxProcessor::ProcessSpecialTxsInBlock(const CBlock& block, const CB
587587
LogPrint(BCLog::BENCHMARK, " - m_qblockman: %.2fms [%.2fs]\n", 0.001 * (nTime5 - nTime4),
588588
nTimeQuorum * 0.000001);
589589

590-
591-
if (opt_cbTx.has_value() && pindex->pprev) {
592-
CDeterministicMNList mn_list;
590+
CDeterministicMNList mn_list;
591+
if (DeploymentActiveAt(*pindex, m_consensus_params, Consensus::DEPLOYMENT_DIP0003)) {
593592
if (!BuildNewListFromBlock(block, pindex->pprev, view, true, state, mn_list)) {
594593
// pass the state returned by the function above
595594
return false;
@@ -600,13 +599,15 @@ bool CSpecialTxProcessor::ProcessSpecialTxsInBlock(const CBlock& block, const CB
600599
// pass the state returned by the function above
601600
return false;
602601
}
602+
}
603603

604604
int64_t nTime5_1 = GetTimeMicros();
605605
nTimeDMN += nTime5_1 - nTime5;
606606

607607
LogPrint(BCLog::BENCHMARK, " - m_dmnman: %.2fms [%.2fs]\n", 0.001 * (nTime5_1 - nTime5),
608608
nTimeDMN * 0.000001);
609609

610+
if (opt_cbTx.has_value()) {
610611
uint256 calculatedMerkleRoot;
611612
if (!CalcCbTxMerkleRootMNList(calculatedMerkleRoot, CSimplifiedMNList{std::move(mn_list)}, state)) {
612613
// pass the state returned by the function above

0 commit comments

Comments
 (0)