File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
framework/src/test/java/org/tron/core/net/services Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 2525import org .tron .common .utils .ReflectUtils ;
2626import org .tron .common .utils .Sha256Hash ;
2727import org .tron .core .ChainBaseManager ;
28+ import org .tron .core .ChainBaseManager .NodeType ;
2829import org .tron .core .Constant ;
2930import org .tron .core .capsule .BlockCapsule ;
3031import org .tron .core .config .DefaultConfig ;
@@ -256,6 +257,15 @@ public void testLowAndGenesisBlockNum() throws NoSuchMethodException {
256257 .setNumber (sid .getNum ())
257258 .build ();
258259 builder .setSolidBlockId (sBlockId );
260+ ChainBaseManager .getChainBaseManager ().setNodeType (NodeType .FULL );
261+ try {
262+ HelloMessage helloMessage = new HelloMessage (builder .build ().toByteArray ());
263+ method .invoke (p2pEventHandler , peer , helloMessage .getSendBytes ());
264+ } catch (Exception e ) {
265+ Assert .fail ();
266+ }
267+
268+ ChainBaseManager .getChainBaseManager ().setNodeType (NodeType .LITE );
259269 try {
260270 HelloMessage helloMessage = new HelloMessage (builder .build ().toByteArray ());
261271 method .invoke (p2pEventHandler , peer , helloMessage .getSendBytes ());
You can’t perform that action at this time.
0 commit comments