Skip to content

Commit

Permalink
Moved activation of BLS HF
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielides committed Dec 5, 2022
1 parent d4686c3 commit 9d819bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/llmq/blockprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ bool CQuorumBlockProcessor::ProcessBlock(const CBlock& block, const CBlockIndex*
return true;
}

if (utils::IsBasicBLSSchemeActive(pindex))
bls::bls_legacy_scheme.store(false);

llmq::utils::PreComputeQuorumMembers(pindex);

std::multimap<Consensus::LLMQType, CFinalCommitment> qcs;
Expand Down Expand Up @@ -284,6 +287,9 @@ bool CQuorumBlockProcessor::UndoBlock(const CBlock& block, const CBlockIndex* pi
{
AssertLockHeld(cs_main);

if (!utils::IsBasicBLSSchemeActive(pindex->pprev))
bls::bls_legacy_scheme.store(true);

llmq::utils::PreComputeQuorumMembers(pindex, true);

std::multimap<Consensus::LLMQType, CFinalCommitment> qcs;
Expand Down
2 changes: 0 additions & 2 deletions src/llmq/dkgsessionmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ void CDKGSessionManager::UpdatedBlockTip(const CBlockIndex* pindexNew, bool fIni
return;
if (!IsQuorumDKGEnabled(spork_manager))
return;
if (utils::IsBasicBLSSchemeActive(pindexNew))
bls::bls_legacy_scheme.store(false);
for (auto& qt : dkgSessionHandlers) {
qt.second.UpdatedBlockTip(pindexNew);
}
Expand Down

0 comments on commit 9d819bf

Please sign in to comment.