Skip to content

Commit

Permalink
Fixed assert() in Controller.cpp
Browse files Browse the repository at this point in the history
As part of the RPA work, this assertion's assumptions changed. Wasn't
detected since I haven't been compiling in Debug mode.

Oops!

Assertion updated to reflect new code.
  • Loading branch information
cculianu committed May 21, 2024
1 parent 8d1b397 commit 235978f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ void Controller::process_DownloadingBlocks()
const bool ok =
std::visit(Overloaded{
[this](const PreProcessedBlockPtr &ppb){
assert(ppb->height == sm->dlResultsHtNext); // paranoia -- should never happen
assert(ppb->height+1u == sm->dlResultsHtNext); // paranoia -- should never happen

// process & add it if it's good
if ( ! process_VerifyAndAddBlock(ppb) )
Expand All @@ -1489,7 +1489,7 @@ void Controller::process_DownloadingBlocks()
return true;
},
[this, &isRpa](const RpaOnlyModeDataPtr &romd){
assert(romd->height == sm->dlResultsHtNext); // paranoia -- should never happen
assert(romd->height+1u == sm->dlResultsHtNext); // paranoia -- should never happen
isRpa = true;
try {
storage->addRpaDataForHeight(romd->height, romd->serializedPrefixTable);
Expand Down

0 comments on commit 235978f

Please sign in to comment.