Skip to content

Commit

Permalink
Update consensus.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarcps committed Dec 6, 2024
1 parent cca68e9 commit 12d370c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/consensus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,8 @@ void Consensus::pullerLoop() {
if (!result.empty()) {
try {
for (auto & block : result) {
if (block.getNHeight() != downloadNHeight) {
this->p2p_.disconnectSession(highestNode.first);
break;
}
this->state_.tryProcessNextBlock(std::move(block));
downloadNHeight++;
++downloadNHeight;
}
} catch (std::exception &e) {
// We actually don't do anything here, because broadcast might have received a block
Expand Down

0 comments on commit 12d370c

Please sign in to comment.