@@ -369,22 +369,17 @@ void chaser_confirm::complete_block(const code& ec, const header_link& link,
369
369
370
370
// Private setters
371
371
// ----------------------------------------------------------------------------
372
- // These affect only confirmed chain and strong tx state (not candidate) .
372
+ // Checkpointed blocks are set strong by archiver, and cannot be reorganized .
373
373
374
- // Milestoned blocks can become formerly-confirmed.
375
- // Checkpointed blocks cannot become formerly-confirmed.
376
- // Reorganization sets unstrong on any formerly-confirmed blocks.
377
374
bool chaser_confirm::set_reorganized (const header_link& link,
378
375
height_t confirmed_height) NOEXCEPT
379
376
{
380
377
BC_ASSERT (stranded ());
381
378
auto & query = archive ();
382
379
383
- // Any non-checkpoint block must be set unstrong.
384
- // But checkpointed blocks cannot be reorganized.
380
+ // Checkpointed blocks cannot be reorganized.
385
381
BC_ASSERT (!is_under_checkpoint (confirmed_height));
386
382
387
- // TODO: make this atomic in store using two-phase commit.
388
383
if (!query.set_unstrong (link) || !query.pop_confirmed ())
389
384
return false ;
390
385
@@ -394,18 +389,15 @@ bool chaser_confirm::set_reorganized(const header_link& link,
394
389
return true ;
395
390
}
396
391
397
- // Checkpointed blocks are set strong by archiver.
398
- // Organization sets strong/unstrong non-checkpointed blocks.
399
392
bool chaser_confirm::set_organized (const header_link& link,
400
393
height_t confirmed_height) NOEXCEPT
401
394
{
402
395
BC_ASSERT (stranded ());
403
396
auto & query = archive ();
404
397
405
- // Any non-checkpoint block must be set strong.
398
+ // Checkpointed blocks are set strong by archiver (redundant here) .
406
399
const auto strong = !is_under_checkpoint (confirmed_height);
407
400
408
- // TODO: make this atomic in store using two-phase commit.
409
401
if ((strong && !query.set_strong (link)) || !query.push_confirmed (link))
410
402
return false ;
411
403
@@ -416,7 +408,6 @@ bool chaser_confirm::set_organized(const header_link& link,
416
408
}
417
409
418
410
// Rollback to the fork point, then forward through previously popped.
419
- // Rollback cannot apply to checkpointed blocks so always set strong/unstrong.
420
411
bool chaser_confirm::roll_back (const header_links& popped, size_t fork_point,
421
412
size_t top) NOEXCEPT
422
413
{
0 commit comments