@@ -43,7 +43,8 @@ chaser_confirm::chaser_confirm(full_node& node) NOEXCEPT
4343 : chaser(node),
4444 threadpool_ (one, node.config().node.priority_()),
4545 independent_strand_(threadpool_.service().get_executor()),
46- concurrent_(node.config().node.concurrent_confirmation)
46+ concurrent_(node.config().node.concurrent_confirmation),
47+ prevout_(node.archive().prevout_enabled())
4748{
4849}
4950
@@ -204,6 +205,13 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT
204205 }
205206 else if (ec == database::error::block_valid)
206207 {
208+ // Set before if not using prevout table.
209+ if (!prevout_ && !query.set_strong (link))
210+ {
211+ fault (error::confirm5);
212+ return ;
213+ }
214+
207215 // Confirmation query.
208216 if ((ec = query.block_confirmable (link)))
209217 {
@@ -213,6 +221,13 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT
213221 return ;
214222 }
215223
224+ // Unset from set before if not using prevout table.
225+ if (!prevout_ && !query.set_unstrong (link))
226+ {
227+ fault (error::confirm5);
228+ return ;
229+ }
230+
216231 if (!query.set_block_unconfirmable (link))
217232 {
218233 fault (error::confirm3);
@@ -231,14 +246,16 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT
231246 return ;
232247 }
233248
234- if (!query.set_strong (link))
249+ // Set after if using prevout table.
250+ if (prevout_ && !query.set_strong (link))
235251 {
236252 fault (error::confirm5);
237253 return ;
238254 }
239255 }
240256 else if (ec == database::error::block_confirmable)
241257 {
258+ // Set in either case.
242259 if (!query.set_strong (link))
243260 {
244261 fault (error::confirm6);
0 commit comments