Skip to content

Commit

Permalink
Merge pull request #642 from evoskuil/master
Browse files Browse the repository at this point in the history
Adapt to database change.
  • Loading branch information
evoskuil committed Jun 12, 2024
2 parents 1d76814 + c78e108 commit 8268fbe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions console/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ void executor::scan_collisions() const
while (!cancel_ && (++index < query_.header_records()))
{
const header_link link{ possible_narrow_cast<hint>(index) };
const auto transactions = query_.to_txs(link);
const auto transactions = query_.to_transactions(link);
for (const auto& transaction: transactions)
{
const auto inputs = query_.to_tx_spends(transaction);
Expand Down Expand Up @@ -882,7 +882,7 @@ void executor::read_test() const
// Get confirmed output tx block position.
auto out_position = max_uint16;
table::txs::get_position txs{ {}, tx_fk };
if (!store_.txs.get(query_.to_txs_link(block_fk), txs))
if (!store_.txs.get(query_.to_txs(block_fk), txs))
return;
else
out_position = possible_narrow_cast<uint16_t>(txs.position);
Expand Down Expand Up @@ -920,7 +920,7 @@ void executor::read_test() const
table::txs::get_position in_txs{ {}, in_tx_fk };
if (!in_bk_fk.is_terminal())
{
if (!store_.txs.get(query_.to_txs_link(in_bk_fk), in_txs))
if (!store_.txs.get(query_.to_txs(in_bk_fk), in_txs))
return;
else
in_position = possible_narrow_cast<uint16_t>(in_txs.position);
Expand Down Expand Up @@ -1101,7 +1101,7 @@ void executor::read_test() const
return;
}

const auto txs = query_.to_txs(block);
const auto txs = query_.to_transactions(block);
if (txs.empty())
{
logger("!txs");
Expand Down Expand Up @@ -1355,7 +1355,7 @@ void executor::read_test() const
//// break;
////}

////const auto txs = query_.to_txs(link);
////const auto txs = query_.to_transactions(link);
////if (txs.empty())
////{
//// logger("Failure: to_txs");
Expand Down
5 changes: 4 additions & 1 deletion src/chasers/chaser_validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ void chaser_validate::do_bump(height_t) NOEXCEPT
continue;
}

// Skipped validation here always succeeds but doesn't set block_valid.
// So this will always start reporting after the top block_confirmable.

// TODO: validation.
////// TODO: the quantity of work must be throttled.
////// This will very rapidly pump all outstanding work into asio queue.
Expand All @@ -213,7 +216,7 @@ bool chaser_validate::enqueue_block(const header_link& link) NOEXCEPT
const auto& query = archive();

database::context context{};
const auto txs = query.to_txs(link);
const auto txs = query.to_transactions(link);
if (txs.empty() || !query.get_context(context, link))
return false;

Expand Down

0 comments on commit 8268fbe

Please sign in to comment.