@@ -97,14 +97,19 @@ public void processHelloMessage(PeerConnection peer, HelloMessage msg) {
9797 }
9898
9999 if (chainBaseManager .getSolidBlockId ().getNum () >= msg .getSolidBlockId ().getNum ()
100- && !chainBaseManager .containBlockInMainChain (msg .getSolidBlockId ())) {
101- logger .info ("Peer {} different solid block, peer->{}, me->{}" ,
102- peer .getInetSocketAddress (),
103- msg .getSolidBlockId ().getString (),
104- chainBaseManager .getSolidBlockId ().getString ());
100+ && !chainBaseManager .containBlockInMainChain (msg .getSolidBlockId ())) {
105101 if (chainBaseManager .getNodeType () == NodeType .FULL ) {
102+ logger .info ("Peer {} solid block is below than we and fork with me, peer->{}, me->{}" ,
103+ peer .getInetSocketAddress (),
104+ msg .getSolidBlockId ().getString (),
105+ chainBaseManager .getSolidBlockId ().getString ());
106106 peer .disconnect (ReasonCode .FORKED );
107107 } else {
108+ logger .info ("Peer {} solid block is below than we and light node doesn't contain the block,"
109+ + " it's unuseful, peer->{}, me->{}" ,
110+ peer .getInetSocketAddress (),
111+ msg .getSolidBlockId ().getString (),
112+ chainBaseManager .getSolidBlockId ().getString ());
108113 peer .disconnect (ReasonCode .LIGHT_NODE_SYNC_FAIL );
109114 }
110115 return ;
0 commit comments