168 const auto pre_block_20_time = set_now(
"2022-04-04",
"04:44:44.450");
173 using trx_deque = sysio::chain::deque< std::tuple< chain::transaction_trace_ptr, packed_transaction_ptr > >;
178 auto trace = make_transaction_trace( trx,
bn, bs_ptr);
179 trx_pairs.push_back(std::tuple(trace, trx));
183 trx_deque trx_pairs_20;
189 add(trx_pairs_20, no_bs);
190 add(trx_pairs_20, no_bs);
191 add(trx_pairs_20, no_bs);
192 add(trx_pairs_20, no_bs);
196 BOOST_TEST(!std::get<0>(trx_pairs_20[0])->producer_block_id.has_value());
201 using op_ts = std::optional<sysio::chain_apis::trx_finality_status_processing::trx_state>;
203 op_ts ts = status.
get_trx_state(std::get<1>(trx_pairs_20[0])->
id());
207 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
208 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
210 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[1])->
id());
214 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
215 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
217 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[2])->
id());
221 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
222 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
224 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[3])->
id());
228 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
229 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
232 trx_deque hold_pairs;
233 std::vector<chain::packed_transaction_ptr> holds;
234 hold_pairs.push_back(trx_pairs_20[2]);
235 hold_pairs.push_back(trx_pairs_20[3]);
236 trx_pairs_20.pop_back();
237 trx_pairs_20.pop_back();
241 const auto bs_20 = make_block_state(
bn);
244 for (
const auto& trx_tuple : trx_pairs_20) {
245 const auto& trace = std::get<0>(trx_tuple);
246 const auto& txn = std::get<1>(trx_tuple);
248 trace->producer_block_id = bs_20->id;
249 trace->block_time = bs_20->block->timestamp;
255 const auto block_20_time = set_now(
"2022-04-04",
"04:44:44.500");
256 add(trx_pairs_20, bs_20);
257 add(trx_pairs_20, bs_20);
262 BOOST_CHECK(cs.head_id == bs_20->id);
263 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_20[0])->producer_block_id);
264 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_20[1])->producer_block_id);
265 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_20[2])->producer_block_id);
266 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_20[3])->producer_block_id);
267 BOOST_CHECK(cs.head_block_timestamp == bs_20->block->timestamp);
269 BOOST_CHECK(cs.earliest_tracked_block_id == bs_20->id);
271 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[0])->
id());
273 BOOST_CHECK(ts->block_id == bs_20->id);
274 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
275 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
276 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
278 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[1])->
id());
280 BOOST_CHECK(ts->block_id == bs_20->id);
281 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
282 BOOST_CHECK(
fc::time_point_sec(ts->expiration) == (std::get<1>(trx_pairs_20[1])->expiration()));
283 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
284 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
286 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[2])->
id());
288 BOOST_CHECK(ts->block_id == bs_20->id);
289 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
290 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
291 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
293 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[3])->
id());
295 BOOST_CHECK(ts->block_id == bs_20->id);
296 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
297 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
298 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
304 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
305 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
311 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
312 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
317 const auto block_21_time = set_now(
"2022-04-04",
"04:44:45.000");
318 trx_deque trx_pairs_21;
320 const auto bs_21 = make_block_state(
bn);
324 add(trx_pairs_21, bs_21);
328 BOOST_CHECK(cs.head_id == bs_21->id);
329 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_21[0])->producer_block_id);
330 BOOST_CHECK(cs.head_block_timestamp == bs_21->block->timestamp);
332 BOOST_CHECK(cs.earliest_tracked_block_id == bs_20->id);
334 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[0])->
id());
336 BOOST_CHECK(ts->block_id == bs_20->id);
337 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
338 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
339 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
341 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[1])->
id());
343 BOOST_CHECK(ts->block_id == bs_20->id);
344 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
345 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
346 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
348 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[2])->
id());
350 BOOST_CHECK(ts->block_id == bs_20->id);
351 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
352 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
353 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
355 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[3])->
id());
357 BOOST_CHECK(ts->block_id == bs_20->id);
358 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
359 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
360 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
366 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
367 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
373 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
374 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
376 ts = status.
get_trx_state(std::get<1>(trx_pairs_21[0])->
id());
378 BOOST_CHECK(ts->block_id == bs_21->id);
379 BOOST_CHECK(ts->block_timestamp == bs_21->block->timestamp);
380 BOOST_CHECK_EQUAL(std::string(ts->received), block_21_time);
381 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
386 const auto block_22_time = set_now(
"2022-04-04",
"04:44:45.500");
387 trx_deque trx_pairs_22;
390 const auto bs_22 = make_block_state(
bn);
393 add(trx_pairs_22, bs_22);
397 BOOST_CHECK(cs.head_id == bs_22->id);
398 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_22[0])->producer_block_id);
399 BOOST_CHECK(cs.head_block_timestamp == bs_22->block->timestamp);
401 BOOST_CHECK(cs.earliest_tracked_block_id == bs_20->id);
404 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[0])->
id());
406 BOOST_CHECK(ts->block_id == bs_20->id);
407 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
408 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
409 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
411 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[1])->
id());
413 BOOST_CHECK(ts->block_id == bs_20->id);
414 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
415 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
416 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
418 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[2])->
id());
420 BOOST_CHECK(ts->block_id == bs_20->id);
421 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
422 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
423 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
425 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[3])->
id());
427 BOOST_CHECK(ts->block_id == bs_20->id);
428 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
429 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
430 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
436 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
437 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
443 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
444 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
446 ts = status.
get_trx_state(std::get<1>(trx_pairs_21[0])->
id());
448 BOOST_CHECK(ts->block_id == bs_21->id);
449 BOOST_CHECK(ts->block_timestamp == bs_21->block->timestamp);
450 BOOST_CHECK_EQUAL(std::string(ts->received), block_21_time);
451 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
453 ts = status.
get_trx_state(std::get<1>(trx_pairs_22[0])->
id());
455 BOOST_CHECK(ts->block_id == bs_22->id);
456 BOOST_CHECK(ts->block_timestamp == bs_22->block->timestamp);
457 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_time);
458 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
464 const auto block_22_alt_time = set_now(
"2022-04-04",
"04:44:46.000");
465 trx_deque trx_pairs_22_alt;
468 const auto bs_22_alt = make_block_state(
bn);
471 add(trx_pairs_22_alt, bs_22_alt);
475 BOOST_CHECK(cs.head_id == bs_22_alt->id);
476 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_22_alt[0])->producer_block_id);
477 BOOST_CHECK(cs.head_block_timestamp == bs_22_alt->block->timestamp);
479 BOOST_CHECK(cs.earliest_tracked_block_id == bs_20->id);
482 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[0])->
id());
484 BOOST_CHECK(ts->block_id == bs_20->id);
485 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
486 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
487 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
489 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[1])->
id());
491 BOOST_CHECK(ts->block_id == bs_20->id);
492 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
493 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
494 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
496 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[2])->
id());
498 BOOST_CHECK(ts->block_id == bs_20->id);
499 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
500 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
501 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
503 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[3])->
id());
505 BOOST_CHECK(ts->block_id == bs_20->id);
506 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
507 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
508 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
514 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
515 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
521 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
522 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
524 ts = status.
get_trx_state(std::get<1>(trx_pairs_21[0])->
id());
526 BOOST_CHECK(ts->block_id == bs_21->id);
527 BOOST_CHECK(ts->block_timestamp == bs_21->block->timestamp);
528 BOOST_CHECK_EQUAL(std::string(ts->received), block_21_time);
529 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
531 ts = status.
get_trx_state(std::get<1>(trx_pairs_22[0])->
id());
533 BOOST_CHECK(ts->block_id == bs_22->id);
534 BOOST_CHECK(ts->block_timestamp == bs_22->block->timestamp);
535 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_time);
536 BOOST_CHECK_EQUAL(ts->status,
"FORKED_OUT");
538 ts = status.
get_trx_state(std::get<1>(trx_pairs_22_alt[0])->
id());
540 BOOST_CHECK(ts->block_id == bs_22_alt->id);
541 BOOST_CHECK(ts->block_timestamp == bs_22_alt->block->timestamp);
542 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_alt_time);
543 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
549 const auto block_19_time = set_now(
"2022-04-04",
"04:44:47.000");
550 trx_deque trx_pairs_19;
553 const auto bs_19 = make_block_state(
bn);
556 add(trx_pairs_19, bs_19);
560 BOOST_CHECK(cs.head_id == bs_19->id);
561 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_19[0])->producer_block_id);
562 BOOST_CHECK(cs.head_block_timestamp == bs_19->block->timestamp);
564 BOOST_CHECK(cs.earliest_tracked_block_id == bs_19->id);
567 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[0])->
id());
569 BOOST_CHECK(ts->block_id == bs_20->id);
570 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
571 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
572 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
574 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[1])->
id());
576 BOOST_CHECK(ts->block_id == bs_20->id);
577 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
578 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
579 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
581 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[2])->
id());
583 BOOST_CHECK(ts->block_id == bs_20->id);
584 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
585 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
586 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
588 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[3])->
id());
590 BOOST_CHECK(ts->block_id == bs_20->id);
591 BOOST_CHECK(ts->block_timestamp == bs_20->block->timestamp);
592 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
593 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
599 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
600 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
606 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
607 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
609 ts = status.
get_trx_state(std::get<1>(trx_pairs_21[0])->
id());
611 BOOST_CHECK(ts->block_id == bs_21->id);
612 BOOST_CHECK(ts->block_timestamp == bs_21->block->timestamp);
613 BOOST_CHECK_EQUAL(std::string(ts->received), block_21_time);
614 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
617 ts = status.
get_trx_state(std::get<1>(trx_pairs_22[0])->
id());
619 BOOST_CHECK(ts->block_id == bs_22->id);
620 BOOST_CHECK(ts->block_timestamp == bs_22->block->timestamp);
621 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_time);
622 BOOST_CHECK_EQUAL(ts->status,
"FAILED");
624 ts = status.
get_trx_state(std::get<1>(trx_pairs_22_alt[0])->
id());
626 BOOST_CHECK(ts->block_id == bs_22_alt->id);
627 BOOST_CHECK(ts->block_timestamp == bs_22_alt->block->timestamp);
628 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_alt_time);
629 BOOST_CHECK_EQUAL(ts->status,
"FORKED_OUT");
631 ts = status.
get_trx_state(std::get<1>(trx_pairs_19[0])->
id());
633 BOOST_CHECK(ts->block_id == bs_19->id);
634 BOOST_CHECK(ts->block_timestamp == bs_19->block->timestamp);
635 BOOST_CHECK_EQUAL(std::string(ts->received), block_19_time);
636 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
641 const auto block_19_alt_time = set_now(
"2022-04-04",
"04:44:44.000");
642 trx_deque trx_pairs_19_alt;
644 trx_pairs_19_alt.push_back(trx_pairs_19[0]);
645 trx_pairs_19_alt.push_back(trx_pairs_20[0]);
646 trx_pairs_19_alt.push_back(trx_pairs_20[1]);
647 trx_pairs_19_alt.push_back(trx_pairs_20[2]);
648 trx_pairs_19_alt.push_back(trx_pairs_20[3]);
649 trx_pairs_19_alt.push_back(hold_pairs[0]);
651 const auto bs_19_alt = make_block_state(
bn);
655 for (
const auto& trx_tuple : trx_pairs_19_alt) {
656 const auto& trace = std::get<0>(trx_tuple);
657 const auto& txn = std::get<1>(trx_tuple);
659 trace->producer_block_id = bs_19_alt->id;
660 trace->block_time = bs_19_alt->block->timestamp;
668 BOOST_CHECK(cs.head_id == bs_19_alt->id);
669 BOOST_CHECK(cs.head_id == *std::get<0>(trx_pairs_19[0])->producer_block_id);
670 BOOST_CHECK(cs.head_block_timestamp == bs_19_alt->block->timestamp);
672 BOOST_CHECK(cs.earliest_tracked_block_id == bs_19_alt->id);
675 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[0])->
id());
677 BOOST_CHECK(ts->block_id == bs_19_alt->id);
678 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
679 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
680 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
682 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[1])->
id());
684 BOOST_CHECK(ts->block_id == bs_19_alt->id);
685 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
686 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
687 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
689 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[2])->
id());
691 BOOST_CHECK(ts->block_id == bs_19_alt->id);
692 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
693 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
694 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
696 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[3])->
id());
698 BOOST_CHECK(ts->block_id == bs_19_alt->id);
699 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
700 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
701 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
705 BOOST_CHECK(ts->block_id == bs_19_alt->id);
706 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
707 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
708 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
714 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
715 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
717 ts = status.
get_trx_state(std::get<1>(trx_pairs_21[0])->
id());
719 BOOST_CHECK(ts->block_id == bs_21->id);
720 BOOST_CHECK(ts->block_timestamp == bs_21->block->timestamp);
721 BOOST_CHECK_EQUAL(std::string(ts->received), block_21_time);
722 BOOST_CHECK_EQUAL(ts->status,
"FORKED_OUT");
725 ts = status.
get_trx_state(std::get<1>(trx_pairs_22[0])->
id());
727 BOOST_CHECK(ts->block_id == bs_22->id);
728 BOOST_CHECK(ts->block_timestamp == bs_22->block->timestamp);
729 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_time);
730 BOOST_CHECK_EQUAL(ts->status,
"FORKED_OUT");
732 ts = status.
get_trx_state(std::get<1>(trx_pairs_22_alt[0])->
id());
734 BOOST_CHECK(ts->block_id == bs_22_alt->id);
735 BOOST_CHECK(ts->block_timestamp == bs_22_alt->block->timestamp);
736 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_alt_time);
737 BOOST_CHECK_EQUAL(ts->status,
"FORKED_OUT");
739 ts = status.
get_trx_state(std::get<1>(trx_pairs_19[0])->
id());
741 BOOST_CHECK(ts->block_id == bs_19_alt->id);
742 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
743 BOOST_CHECK_EQUAL(std::string(ts->received), block_19_time);
744 BOOST_CHECK_EQUAL(ts->status,
"IN_BLOCK");
757 BOOST_CHECK(cs.head_id == bs_19_alt->id);
758 BOOST_CHECK(cs.irr_id == bs_19_alt->id);
759 BOOST_CHECK(cs.irr_block_timestamp == bs_19_alt->block->timestamp);
760 BOOST_CHECK(cs.earliest_tracked_block_id == bs_19_alt->id);
763 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[0])->
id());
765 BOOST_CHECK(ts->block_id == bs_19_alt->id);
766 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
767 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
768 BOOST_CHECK_EQUAL(ts->status,
"IRREVERSIBLE");
770 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[1])->
id());
772 BOOST_CHECK(ts->block_id == bs_19_alt->id);
773 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
774 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
775 BOOST_CHECK_EQUAL(ts->status,
"IRREVERSIBLE");
777 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[2])->
id());
779 BOOST_CHECK(ts->block_id == bs_19_alt->id);
780 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
781 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
782 BOOST_CHECK_EQUAL(ts->status,
"IRREVERSIBLE");
784 ts = status.
get_trx_state(std::get<1>(trx_pairs_20[3])->
id());
786 BOOST_CHECK(ts->block_id == bs_19_alt->id);
787 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
788 BOOST_CHECK_EQUAL(std::string(ts->received), block_20_time);
789 BOOST_CHECK_EQUAL(ts->status,
"IRREVERSIBLE");
793 BOOST_CHECK(ts->block_id == bs_19_alt->id);
794 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
795 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
796 BOOST_CHECK_EQUAL(ts->status,
"IRREVERSIBLE");
802 BOOST_CHECK_EQUAL(std::string(ts->received), pre_block_20_time);
803 BOOST_CHECK_EQUAL(ts->status,
"LOCALLY_APPLIED");
805 ts = status.
get_trx_state(std::get<1>(trx_pairs_21[0])->
id());
807 BOOST_CHECK(ts->block_id == bs_21->id);
808 BOOST_CHECK(ts->block_timestamp == bs_21->block->timestamp);
809 BOOST_CHECK_EQUAL(std::string(ts->received), block_21_time);
810 BOOST_CHECK_EQUAL(ts->status,
"FORKED_OUT");
813 ts = status.
get_trx_state(std::get<1>(trx_pairs_22[0])->
id());
815 BOOST_CHECK(ts->block_id == bs_22->id);
816 BOOST_CHECK(ts->block_timestamp == bs_22->block->timestamp);
817 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_time);
818 BOOST_CHECK_EQUAL(ts->status,
"FORKED_OUT");
820 ts = status.
get_trx_state(std::get<1>(trx_pairs_22_alt[0])->
id());
822 BOOST_CHECK(ts->block_id == bs_22_alt->id);
823 BOOST_CHECK(ts->block_timestamp == bs_22_alt->block->timestamp);
824 BOOST_CHECK_EQUAL(std::string(ts->received), block_22_alt_time);
825 BOOST_CHECK_EQUAL(ts->status,
"FORKED_OUT");
827 ts = status.
get_trx_state(std::get<1>(trx_pairs_19[0])->
id());
829 BOOST_CHECK(ts->block_id == bs_19_alt->id);
830 BOOST_CHECK(ts->block_timestamp == bs_19_alt->block->timestamp);
831 BOOST_CHECK_EQUAL(std::string(ts->received), block_19_time);
832 BOOST_CHECK_EQUAL(ts->status,
"IRREVERSIBLE");