Skip to content

Commit 2483d0a

Browse files
authored
Merge pull request #703 from evoskuil/master
Rename to_tx_spends due to db change.
2 parents d0e4cd2 + 2c50aaa commit 2483d0a

File tree

4 files changed

+9
-20
lines changed

4 files changed

+9
-20
lines changed

console/executor_scans.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ void executor::scan_collisions() const
432432
const auto transactions = query_.to_transactions(link);
433433
for (const auto& transaction: transactions)
434434
{
435-
const auto inputs = query_.to_tx_spends(transaction);
435+
const auto inputs = query_.to_spends(transaction);
436436
for (const auto& in: inputs)
437437
{
438438
++total;

src/chasers/chaser_check.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ size_t chaser_check::set_unassociated() NOEXCEPT
381381
<< count << ") last ("
382382
<< requested_ << ").");
383383

384-
////notify(error::success, chase::checking, requested_);
385384
return count;
386385
}
387386

src/chasers/chaser_confirm.cpp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ chaser_confirm::chaser_confirm(full_node& node) NOEXCEPT
4343
: chaser(node),
4444
concurrent_(node.config().node.concurrent_confirmation),
4545
threadpool_(1_u32, node.config().node.priority_validation ?
46-
network::thread_priority::highest : network::thread_priority::high),
46+
network::thread_priority::high : network::thread_priority::normal),
4747
strand_(threadpool_.service().get_executor())
4848
{
4949
}
@@ -86,7 +86,7 @@ bool chaser_confirm::handle_event(const code&, chase event_,
8686
return true;
8787

8888
// An unconfirmable block height must not land here.
89-
// These can come out of order, advance in order synchronously.
89+
// These come out of order, advance in order synchronously.
9090
switch (event_)
9191
{
9292
////case chase::blocks:
@@ -127,14 +127,6 @@ bool chaser_confirm::handle_event(const code&, chase event_,
127127

128128
break;
129129
}
130-
////case chase::checking:
131-
////{
132-
//// BC_ASSERT(std::holds_alternative<height_t>(value));
133-
//// ////POST(do_checking, std::get<height_t>(value));
134-
//// boost::asio::post(strand_,
135-
//// BIND(do_checking, std::get<height_t>(value)));
136-
//// break;
137-
////}
138130
case chase::regressed:
139131
{
140132
BC_ASSERT(std::holds_alternative<height_t>(value));
@@ -164,10 +156,6 @@ bool chaser_confirm::handle_event(const code&, chase event_,
164156
return true;
165157
}
166158

167-
////void chaser_confirm::do_checking(height_t height) NOEXCEPT
168-
////{
169-
////}
170-
171159
void chaser_confirm::do_regressed(height_t branch_point) NOEXCEPT
172160
{
173161
BC_ASSERT(stranded());
@@ -194,6 +182,9 @@ void chaser_confirm::do_validated(height_t height) NOEXCEPT
194182
do_bump(height);
195183
}
196184

185+
// TODO: This is a simplified variant of the full implementation below.
186+
// This variant doesn't implement the relative work check and instead confirms
187+
// one block at a time, just like validation.
197188
void chaser_confirm::do_bump(height_t) NOEXCEPT
198189
{
199190
BC_ASSERT(stranded());
@@ -224,6 +215,7 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT
224215
return;
225216
}
226217

218+
// Confirmation query.
227219
if ((ec = query.block_confirmable(link)))
228220
{
229221
if (ec == database::error::integrity)
@@ -287,6 +279,7 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT
287279
// database::error::unknown_state [shouldn't be here]
288280
// database::error::unassociated [shouldn't be here]
289281
// database::error::unvalidated [shouldn't be here]
282+
fault(error::confirm8);
290283
return;
291284
}
292285

src/chasers/chaser_validate.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ void chaser_validate::validate_block(const header_link& link) NOEXCEPT
241241
block->populate();
242242
if (!query.populate(*block))
243243
{
244-
// This could instead be a case of invalid milestone.
245-
////POST(complete_block, error::validate3, link, ctx.height);
244+
////POST(complete_block, error::validate3, link, ctx.height);
246245
boost::asio::post(strand_,
247246
BIND(complete_block, error::validate3, link, ctx.height));
248247
return;
@@ -253,9 +252,7 @@ void chaser_validate::validate_block(const header_link& link) NOEXCEPT
253252
((ec = block->connect(ctx))))
254253
{
255254
if (!query.set_block_unconfirmable(link))
256-
{
257255
ec = error::validate4;
258-
}
259256
}
260257
else if (!query.set_block_valid(link))
261258
{

0 commit comments

Comments
 (0)