diff --git a/nano/core_test/node.cpp b/nano/core_test/node.cpp index 8f68b10ce1..d7dd5298d6 100644 --- a/nano/core_test/node.cpp +++ b/nano/core_test/node.cpp @@ -2629,6 +2629,15 @@ TEST (node, DISABLED_vote_by_hash_epoch_block_republish) TEST (node, epoch_conflict_confirm) { + // Print easily visible separator + for (int i = 0; i < 10; ++i) + { + std::cout << "==" << std::endl; + } + std::cout << std::endl; + std::cout << std::endl; + std::cout << std::endl; + nano::test::system system; nano::node_config node_config (system.get_available_port (), system.logging); node_config.frontiers_confirmation = nano::frontiers_confirmation_mode::disabled; @@ -2684,15 +2693,6 @@ TEST (node, epoch_conflict_confirm) .work (*system.work.generate (open->hash ())) .build_shared (); - // Print easily visible separator - for (int i = 0; i < 10; ++i) - { - std::cout << "==" << std::endl; - } - std::cout << std::endl; - std::cout << std::endl; - std::cout << std::endl; - std::cout << "send: " << send->hash ().to_string () << " root: " << send->root ().to_string () << std::endl; std::cout << "open: " << open->hash ().to_string () << " root: " << open->root ().to_string () << std::endl; std::cout << "change: " << change->hash ().to_string () << " root: " << change->root ().to_string () << std::endl; diff --git a/nano/node/confirmation_height_processor.cpp b/nano/node/confirmation_height_processor.cpp index 6cf9772999..76f321cb6e 100644 --- a/nano/node/confirmation_height_processor.cpp +++ b/nano/node/confirmation_height_processor.cpp @@ -157,6 +157,8 @@ void nano::confirmation_height_processor::unpause () void nano::confirmation_height_processor::add (std::shared_ptr const & block_a) { + std::cout << "confirmation_height_processor::add hash: " << block_a->hash ().to_string () << std::endl; + { nano::lock_guard lk (mutex); awaiting_processing.get ().emplace_back (block_a); diff --git a/nano/node/election.cpp b/nano/node/election.cpp index 67c36be437..08527d6f90 100644 --- a/nano/node/election.cpp +++ b/nano/node/election.cpp @@ -151,9 +151,9 @@ void nano::election::send_confirm_req (nano::confirmation_solicitor & solicitor_ { if (confirm_req_time () < (std::chrono::steady_clock::now () - last_req)) { - std::cout - << "node: " << node.network.port << " " - << "send_confirm_req for: " << status.winner->hash ().to_string () << " id: " << (void *)this << std::endl; + // std::cout + // << "node: " << node.network.port << " " + // << "send_confirm_req for: " << status.winner->hash ().to_string () << " id: " << (void *)this << std::endl; nano::lock_guard guard{ mutex }; if (!solicitor_a.add (*this)) diff --git a/nano/node/request_aggregator.cpp b/nano/node/request_aggregator.cpp index 4baead51fe..125dcb3e69 100644 --- a/nano/node/request_aggregator.cpp +++ b/nano/node/request_aggregator.cpp @@ -41,11 +41,11 @@ void nano::request_aggregator::add (std::shared_ptr co auto const endpoint (nano::transport::map_endpoint_to_v6 (channel_a->get_endpoint ())); nano::unique_lock lock{ mutex }; - for (auto const & [hash, root] : hashes_roots_a) - { - std::cout - << "request aggregator request #1 for: " << hash.to_string () << std::endl; - } +// for (auto const & [hash, root] : hashes_roots_a) +// { +// std::cout +// << "request aggregator request #1 for: " << hash.to_string () << std::endl; +// } // Protecting from ever-increasing memory usage when request are consumed slower than generated // Reject request if the oldest request has not yet been processed after its deadline + a modest margin @@ -88,11 +88,11 @@ void nano::request_aggregator::add (std::shared_ptr co }); if (requests.size () == 1) { - for (auto const & [hash, root] : hashes_roots_a) - { - std::cout - << "request aggregator request #5 for: " << hash.to_string () << std::endl; - } +// for (auto const & [hash, root] : hashes_roots_a) +// { +// std::cout +// << "request aggregator request #5 for: " << hash.to_string () << std::endl; +// } lock.unlock (); condition.notify_all (); @@ -113,7 +113,7 @@ void nano::request_aggregator::run () { if (!requests.empty ()) { - std::cout << "request aggregator loop" << std::endl; +// std::cout << "request aggregator loop" << std::endl; auto & requests_by_deadline (requests.get ()); auto front (requests_by_deadline.begin ()); @@ -235,12 +235,12 @@ std::pair>, std::vector cached_hashes; for (auto const & [hash, root] : requests_a) { - std::cout << "aggregate: " << hash.to_string () << " root: " << root.to_string () << std::endl; + // std::cout << "aggregate: " << hash.to_string () << " root: " << root.to_string () << std::endl; // 0. Hashes already sent if (cached_hashes.count (hash) > 0) { - std::cout << "aggregate drop: " << hash.to_string () << std::endl; + // std::cout << "aggregate drop: " << hash.to_string () << std::endl; continue; } @@ -248,7 +248,7 @@ std::pair>, std::vector>, std::vector>, std::vector>, std::vector>, std::vector>, std::vectorhash ().to_string () << std::endl; - } - for (auto const & block : to_generate_final) - { - std::cout - << "aggregate to_generate_final #temp: " << block->hash ().to_string () << std::endl; - } + // for (auto const & block : to_generate) + // { + // std::cout + // << "aggregate to_generate #temp: " << block->hash ().to_string () << std::endl; + // } + // for (auto const & block : to_generate_final) + // { + // std::cout + // << "aggregate to_generate_final #temp: " << block->hash ().to_string () << std::endl; + // } // Let the node know about the alternative block if (block->hash () != hash) @@ -408,16 +408,16 @@ std::pair>, std::vectorhash ().to_string () << std::endl; - } - for (auto const & block : to_generate_final) - { - std::cout - << "aggregate to_generate_final: " << block->hash ().to_string () << std::endl; - } + // for (auto const & block : to_generate) + // { + // std::cout + // << "aggregate to_generate: " << block->hash ().to_string () << std::endl; + // } + // for (auto const & block : to_generate_final) + // { + // std::cout + // << "aggregate to_generate_final: " << block->hash ().to_string () << std::endl; + // } return std::make_pair (to_generate, to_generate_final); } diff --git a/nano/node/voting.cpp b/nano/node/voting.cpp index b9e35df5e7..4780f30147 100644 --- a/nano/node/voting.cpp +++ b/nano/node/voting.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -232,6 +233,12 @@ void nano::vote_generator::stop () void nano::vote_generator::add (const root & root, const block_hash & hash) { + std::cout << "vote_generator::add" + << " root: " << root.to_string () + << " hash: " << hash.to_string () + << " stacktrace: " << nano::generate_stacktrace () + << std::endl; + vote_generation_queue.add (std::make_pair (root, hash)); } diff --git a/nano/store/lmdb/final_vote.cpp b/nano/store/lmdb/final_vote.cpp index 358353fd7e..ae0aaa351f 100644 --- a/nano/store/lmdb/final_vote.cpp +++ b/nano/store/lmdb/final_vote.cpp @@ -17,7 +17,7 @@ bool nano::store::lmdb::final_vote::put (store::write_transaction const & transa } else { - std::cout << "put final vote for root: " << root.to_string () + std::cout << "final vote store root: " << root.to_string () << " hash: " << hash.to_string () << std::endl;