Skip to content

Commit

Permalink
1560 slow catchup
Browse files Browse the repository at this point in the history
  • Loading branch information
kladkogex committed Feb 23, 2024
1 parent ec7e908 commit 15b344f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions chains/Schain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,10 @@ void Schain::proposeNextBlock(bool _isCalledAfterCatchup) {
CHECK_STATE(myProposal->getSignature() != "");



proposedBlockArrived(myProposal);

if (getSchain()->getOptimizerAgent()->doOptimizedConsensus(_proposedBlockID)) {
auto winner = getSchain()->getOptimizerAgent()->getLastWinner(_proposedBlockID);
auto winner = getSchain()->getOptimizerAgent()->getLastWinner(_proposedBlockID);
if (winner != getSchain()->getSchainIndex()) {
return;
}
Expand Down Expand Up @@ -904,12 +903,11 @@ void Schain::daProofArrived(const ptr<DAProof> &_daProof) {

if (getOptimizerAgent()->doOptimizedConsensus(bid)) {
auto lastWinner = getOptimizerAgent()->getLastWinner(_daProof->getBlockId());
if (lastWinner != 0) {
if (_daProof->getProposerIndex() == lastWinner) {
pv = make_shared<BooleanProposalVector>(getNodeCount(), lastWinner);
}
if (_daProof->getProposerIndex() == lastWinner) {
pv = make_shared<BooleanProposalVector>(getNodeCount(), lastWinner);
}
}

if (pv) {
// try starting consensus. It may already have been started due to
// block proposal receipt timeout
Expand Down

0 comments on commit 15b344f

Please sign in to comment.