Skip to content

Commit

Permalink
Merge pull request #588 from evoskuil/master
Browse files Browse the repository at this point in the history
Change -x command.
  • Loading branch information
evoskuil committed Apr 17, 2024
2 parents 852c384 + ce90202 commit 82fe815
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 20 additions & 2 deletions console/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,10 +700,28 @@ void executor::scan_collisions() const
spend.shrink_to_fit();
}

// arbitrary testing (const).
////// arbitrary testing (const).
////void executor::read_test() const
////{
//// console("No read test implemented.");
////}

// 804'001_size
void executor::read_test() const
{
console("No read test implemented.");
size_t count{};
const auto start = unix_time();

// Failure should be common due to double spends.
for (size_t height = 0_size;
!cancel_ && height <= query_.get_top_confirmed();
++height, ++count)
{
const auto ec = query_.block_confirmable(query_.to_confirmed(height));
console(format("Confirm [%1%] test (%2%).") % height % ec.message());
}

console(format("%1% confirmed in %2% secs.") % count % (unix_time() - start));
}

////void executor::read_test() const
Expand Down
2 changes: 2 additions & 0 deletions src/chasers/chaser_confirm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ void chaser_confirm::do_preconfirmed(height_t height) NOEXCEPT
fault(error::store_integrity);
return;
}

continue;
}

Expand Down Expand Up @@ -268,6 +269,7 @@ code chaser_confirm::confirm(const header_link& link,

// utility
// ----------------------------------------------------------------------------
// TODO: set_strong before check, unset on roll_back, push_confirmed in batch.

bool chaser_confirm::set_confirmed(header_t link, height_t height) NOEXCEPT
{
Expand Down

0 comments on commit 82fe815

Please sign in to comment.