From 5843fde87a2d3009d23b30f3aab8596de0239fb8 Mon Sep 17 00:00:00 2001 From: Phil Mesnier Date: Fri, 27 Apr 2018 08:13:00 -0500 Subject: [PATCH] #2615 fix for interrupted syncing --- plugins/net_plugin/net_plugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index b14833b2d..115355747 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -883,7 +883,7 @@ namespace eosio { handshake_initializer::populate(last_handshake_sent); last_handshake_sent.generation = ++sent_handshake_count; fc_dlog(logger, "Sending handshake generation ${g} to ${ep}", - ("g",last_handshake_sent.generation)("ep", peer_addr)); + ("g",last_handshake_sent.generation)("ep", peer_name())); enqueue(last_handshake_sent); } @@ -1416,6 +1416,9 @@ namespace eosio { if( req.req_blocks.mode == catch_up ) { c->fork_head = id; c->fork_head_num = num; + ilog ("got a catch_up notice while in ${s}, fork head num = ${fhn} target LIB = ${lib} next_expected = ${ne}", ("s",stage_str(state))("fhn",num)("lib",sync_known_lib_num)("ne", sync_next_expected_num)); + if (state == lib_catchup) + return; set_state(head_catchup); } else { @@ -1444,6 +1447,7 @@ namespace eosio { } void sync_manager::recv_block (connection_ptr c, const block_id_type &blk_id, uint32_t blk_num, bool accepted) { + fc_dlog(logger," got block ${bn} from ${p}",("bn",blk_num)("p",c->peer_name())); if (!accepted) { uint32_t head_num = chain_plug->chain().head_block_num(); if (head_num != last_repeated) { -- GitLab