Skip to content

Commit 044c836

Browse files
committed
Adapt to store push/pop_confirmed (internal set/unset strong).
1 parent c2b2e65 commit 044c836

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/chasers/chaser_confirm.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@ bool chaser_confirm::set_reorganized(const header_link& link,
379379

380380
// Checkpointed blocks cannot be reorganized.
381381
BC_ASSERT(!is_under_checkpoint(confirmed_height));
382-
383-
if (!query.set_unstrong(link) || !query.pop_confirmed())
382+
if (!query.pop_confirmed())
384383
return false;
385384

386385
notify(error::success, chase::reorganized, link);
@@ -395,10 +394,8 @@ bool chaser_confirm::set_organized(const header_link& link,
395394
BC_ASSERT(stranded());
396395
auto& query = archive();
397396

398-
// Checkpointed blocks are set strong by archiver (redundant here).
399-
const auto strong = !is_under_checkpoint(confirmed_height);
400-
401-
if ((strong && !query.set_strong(link)) || !query.push_confirmed(link))
397+
// Checkpointed blocks are set strong by archiver.
398+
if (!query.push_confirmed(link, !is_under_checkpoint(confirmed_height)))
402399
return false;
403400

404401
notify(error::success, chase::organized, link);

0 commit comments

Comments
 (0)