Skip to content

Commit

Permalink
Merge pull request #23 from skydogenet/master
Browse files Browse the repository at this point in the history
Fix HandleMainchainReorg function
  • Loading branch information
psztorc authored Sep 16, 2024
2 parents b1f02e9 + 1e88cc9 commit 026d603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5076,7 +5076,7 @@ bool HandleMainchainReorg(CValidationState& state, const CChainParams& chainpara
bool fGenesis = pindex->GetBlockHeader().GetHash() == chainparams.GetConsensus().hashGenesisBlock;
// If a mainchain block with a bmm commitment for the tip is disconnected,
// then we also must disconnect the tip.
while (!fGenesis && drivechain->VerifyBMM(pindex->GetBlockHeader()) && !drivechain->IsConnected(pindex->GetBlockHeader())) {
while (!fGenesis && !drivechain->VerifyBMM(pindex->GetBlockHeader())) {
// So we invalidate the tip until we reach a block with a commitment in
// a mainchain block that is part of consensus.
InvalidateBlock(state, chainparams, pindex);
Expand Down

0 comments on commit 026d603

Please sign in to comment.