@@ -57,8 +57,8 @@ code CLASS::start() NOEXCEPT
5757
5858 if (!state_)
5959 {
60- fault (error::get_candidate_chain_state );
61- return error::get_candidate_chain_state ;
60+ fault (error::organize1 );
61+ return error::organize1 ;
6262 }
6363
6464 LOGN (" Candidate top [" << system::encode_hash (state_->hash ()) << " :"
@@ -205,14 +205,14 @@ void CLASS::do_organize(typename Block::cptr block,
205205
206206 if (!get_branch_work (work, branch_point, tree_branch, store_branch, header))
207207 {
208- handler (fault (error::get_branch_work ), height);
208+ handler (fault (error::organize2 ), height);
209209 return ;
210210 }
211211
212212 // branch_point is the highest tree-candidate common block.
213213 if (!get_is_strong (strong, work, branch_point))
214214 {
215- handler (fault (error::get_is_strong ), height);
215+ handler (fault (error::organize3 ), height);
216216 return ;
217217 }
218218
@@ -235,7 +235,7 @@ void CLASS::do_organize(typename Block::cptr block,
235235 const auto top_candidate = state_->height ();
236236 if (branch_point > top_candidate)
237237 {
238- handler (fault (error::invalid_branch_point ), height);
238+ handler (fault (error::organize4 ), height);
239239 return ;
240240 }
241241
@@ -247,7 +247,7 @@ void CLASS::do_organize(typename Block::cptr block,
247247 if ((is_under_milestone (index) && !query.set_unstrong (candidate)) ||
248248 !query.pop_candidate ())
249249 {
250- handler (fault (error::pop_candidate ), height);
250+ handler (fault (error::organize5 ), height);
251251 return ;
252252 }
253253
@@ -264,7 +264,7 @@ void CLASS::do_organize(typename Block::cptr block,
264264 if ((is_under_milestone (index) && !query.set_strong (link)) ||
265265 !query.push_candidate (link))
266266 {
267- handler (fault (error::push_candidate ), height);
267+ handler (fault (error::organize6 ), height);
268268 return ;
269269 }
270270
@@ -347,15 +347,15 @@ void CLASS::do_disorganize(header_t link) NOEXCEPT
347347 size_t height{};
348348 if (!query.get_height (height, link) || is_zero (height))
349349 {
350- fault (error::get_height );
350+ fault (error::organize7 );
351351 return ;
352352 }
353353
354354 // Must reorganize down to fork point, since entire branch is now weak.
355355 const auto fork_point = query.get_fork ();
356356 if (height <= fork_point)
357357 {
358- fault (error::invalid_fork_point );
358+ fault (error::organize8 );
359359 return ;
360360 }
361361
@@ -365,7 +365,7 @@ void CLASS::do_disorganize(header_t link) NOEXCEPT
365365 auto state = query.get_candidate_chain_state (settings_, fork_point);
366366 if (!state)
367367 {
368- fault (error::get_candidate_chain_state );
368+ fault (error::organize9 );
369369 return ;
370370 }
371371
@@ -378,7 +378,7 @@ void CLASS::do_disorganize(header_t link) NOEXCEPT
378378 {
379379 if (!get_block (block, index))
380380 {
381- fault (error::get_block );
381+ fault (error::organize10 );
382382 return ;
383383 }
384384
@@ -398,7 +398,7 @@ void CLASS::do_disorganize(header_t link) NOEXCEPT
398398 if ((is_under_milestone (index) && !query.set_unstrong (candidate)) ||
399399 !query.pop_candidate ())
400400 {
401- fault (error::pop_candidate );
401+ fault (error::organize11 );
402402 return ;
403403 }
404404
@@ -418,7 +418,7 @@ void CLASS::do_disorganize(header_t link) NOEXCEPT
418418 // Confirmed are already set_strong and must stay that way.
419419 if (!query.push_candidate (query.to_confirmed (index)))
420420 {
421- fault (error::push_candidate );
421+ fault (error::organize12 );
422422 return ;
423423 }
424424
@@ -428,7 +428,7 @@ void CLASS::do_disorganize(header_t link) NOEXCEPT
428428 state = query.get_candidate_chain_state (settings_, top_confirmed);
429429 if (!state)
430430 {
431- fault (error::get_candidate_chain_state );
431+ fault (error::organize13 );
432432 return ;
433433 }
434434
@@ -552,7 +552,7 @@ code CLASS::push_block(const Block& block,
552552 return ec;
553553
554554 if (!query.push_candidate (link))
555- return error::push_candidate ;
555+ return error::organize14 ;
556556
557557 return ec;
558558}
@@ -562,7 +562,7 @@ code CLASS::push_block(const system::hash_digest& key) NOEXCEPT
562562{
563563 const auto handle = tree_.extract (key);
564564 if (!handle)
565- return error::branch_error ;
565+ return error::organize15 ;
566566
567567 const auto & value = handle.mapped ();
568568 return push_block (*value.block , value.state ->context ());
0 commit comments