@@ -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-
171159void 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.
197188void 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
0 commit comments