Skip to content

Commit

Permalink
Merge pull request #7941 from EOSIO/net-plugin-sync-1.8
Browse files Browse the repository at this point in the history
Net plugin sync - 1.8
  • Loading branch information
brianjohnson5972 authored Sep 17, 2019
2 parents e11adfe + 130cc1c commit a5eeeee
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a5eeeee

Please sign in to comment.