diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index b563a36294..47086502a1 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -810,6 +810,7 @@ namespace eosio { last_handshake_recv = handshake_message(); last_handshake_sent = handshake_message(); my_impl->sync_master->reset_lib_num(shared_from_this()); + fc_ilog(logger, "closing ${a}, ${p}", ("a",peer_addr)("p",peer_name())); fc_dlog(logger, "canceling wait on ${p}", ("p",peer_name())); cancel_wait(); if( read_delay_timer ) read_delay_timer->cancel(); @@ -1552,7 +1553,14 @@ namespace eosio { if (msg.known_blocks.ids.size() == 0) { fc_elog( logger,"got a catch up with ids size = 0" ); } else { - verify_catchup(c, msg.known_blocks.pending, msg.known_blocks.ids.back()); + const block_id_type& id = msg.known_blocks.ids.back(); + controller& cc = chain_plug->chain(); + if( !cc.fetch_block_by_id( id ) ) { + verify_catchup( c, msg.known_blocks.pending, id ); + } else { + // we already have the block, so update peer with our view of the world + c->send_handshake(); + } } } else {