From e9a6c0857ca077712cfd95a50d1510bc2fd8b9df Mon Sep 17 00:00:00 2001 From: Brian Johnson Date: Fri, 15 Feb 2019 14:27:57 -0600 Subject: [PATCH] Changed to report from peer's LIB, since we don't know if any blocks after that correspond to our blocks. GH #6755 --- plugins/net_plugin/net_plugin.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index 96c491a09f0..27ae104b3fc 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -866,13 +866,7 @@ namespace eosio { fc_dlog(logger, "maybe truncating branch at = ${h}:${id}",("h",remote_head_num)("id",remote_head_id)); } - // base our branch off of the last handshake we sent the peer instead of our current - // LIB which could have moved forward in time as packets were in flight. - if (last_handshake_sent.generation >= 1) { - lib_id = last_handshake_sent.last_irreversible_block_id; - } else { - lib_id = cc.last_irreversible_block_id(); - } + lib_id = last_handshake_recv.last_irreversible_block_id; head_id = cc.fork_db_head_block_id(); } catch (const assert_exception& ex) {