|
34 | 34 | #include <async/algorithm.h>
|
35 | 35 | #include <async/FutureUtils.hpp>
|
36 | 36 | #include <debug/Benchmarker.h>
|
| 37 | +#include <iostream> |
37 | 38 |
|
38 | 39 | #define NEW_BENCHMARK(x) std::make_shared<Benchmarker>(fmt::format(x"/{}", buddy->synchronizationTag), buddy->logger)
|
39 | 40 |
|
@@ -693,21 +694,34 @@ namespace ledger {
|
693 | 694 | lastBlock.getValue().height < tx.block.getValue().height) {
|
694 | 695 | lastBlock = tx.block;
|
695 | 696 | }
|
| 697 | + std::cout << "transaction intepretation begin" << std::endl; |
696 | 698 | self->interpretTransaction(tx, buddy, operations);
|
| 699 | + std::cout << "transaction intepretation end" << std::endl; |
697 | 700 | //Update first pendingTxHash in savedState
|
698 | 701 | auto it = buddy->transactionsToDrop.find(tx.hash);
|
| 702 | + std::cout << "tx.hash" << std::endl; |
| 703 | + std::cout << tx.hash << std::endl; |
| 704 | + std::cout << buddy->transactionsToDrop.size() << std::endl; |
699 | 705 | if (it != buddy->transactionsToDrop.end()) {
|
| 706 | + std::cout << "transactionToDrop found" << std::endl; |
700 | 707 | //If block non empty, tx is no longer pending
|
701 | 708 | if (tx.block.nonEmpty()) {
|
| 709 | + std::cout << "erase" << std::endl; |
702 | 710 | buddy->savedState.getValue().pendingTxsHash.erase(it->first);
|
| 711 | + std::cout << "erase finish" << std::endl; |
703 | 712 | }
|
704 | 713 | else { //Otherwise tx is in mempool but pending
|
| 714 | + std::cout << "insert to mempool" << std::endl; |
705 | 715 | buddy->savedState.getValue().pendingTxsHash.insert(std::pair<std::string, std::string>(it->first, it->second));
|
| 716 | + std::cout << "insert to mempool finish" << std::endl; |
706 | 717 | }
|
707 | 718 | }
|
708 | 719 | //Remove from tx to drop
|
| 720 | + std::cout << "Remove from tx to drop" << std::endl; |
709 | 721 | buddy->transactionsToDrop.erase(tx.hash);
|
| 722 | + std::cout << "Remove from tx to drop finish" << std::endl; |
710 | 723 | }
|
| 724 | + std::cout << "Succeed to insert transactions" << std::endl; |
711 | 725 | interpretBenchmark->stop();
|
712 | 726 | auto insertionBenchmark = NEW_BENCHMARK("insert_operations");
|
713 | 727 | insertionBenchmark->start();
|
|
0 commit comments