From 81d2679db9c66a41020f9f9442e3bf95d6e83c48 Mon Sep 17 00:00:00 2001 From: Nathan Hourt Date: Wed, 22 Jul 2015 11:17:30 -0400 Subject: [PATCH] Cut back on log spam during resyncing --- libraries/app/application.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index 227a83db..22fee5e4 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -133,7 +133,7 @@ namespace detail { { string::size_type colon_pos = endpoint_string.find(':'); if (colon_pos == std::string::npos) - FC_THROW("Missing required port number in endpoint string \"${endpoint_string}\"", + FC_THROW("Missing required port number in endpoint string \"${endpoint_string}\"", ("endpoint_string", endpoint_string)); std::string port_string = endpoint_string.substr(colon_pos + 1); try @@ -315,7 +315,9 @@ namespace detail { virtual bool handle_block(const graphene::net::block_message& blk_msg, bool sync_mode, std::vector& contained_transaction_message_ids) override { try { - ilog("Got block #${n} from network", ("n", blk_msg.block.block_num())); + if (!sync_mode || blk_msg.block.block_num() % 10000 == 0) + ilog("Got block #${n} from network", ("n", blk_msg.block.block_num())); + try { bool result = _chain_db->push_block(blk_msg.block, _is_block_producer ? database::skip_nothing : database::skip_transaction_signatures); @@ -324,9 +326,9 @@ namespace detail { { // if we're not in sync mode, there's a chance we will be seeing some transactions // included in blocks before we see the free-floating transaction itself. If that - // happens, there's no reason to fetch the transactions, so construct a list of the + // happens, there's no reason to fetch the transactions, so construct a list of the // transaction message ids we no longer need. - // during sync, it is unlikely that we'll see any old + // during sync, it is unlikely that we'll see any old for (const processed_transaction& transaction : blk_msg.block.transactions) { graphene::net::trx_message transaction_message(transaction);