Skip to content

Commit 2e150a4

Browse files
committed
remove the tron message data valid
1 parent fcb4f09 commit 2e150a4

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎src/main/java/org/tron/core/net/message/TronMessageFactory.java‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import org.apache.commons.lang3.ArrayUtils;
44
import org.tron.common.overlay.message.MessageFactory;
55
import org.tron.core.exception.P2pException;
6-
import org.tron.core.exception.P2pException.TypeEnum;
76

87
/**
98
* msg factory.
@@ -12,10 +11,6 @@ public class TronMessageFactory extends MessageFactory {
1211

1312
@Override
1413
public TronMessage create(byte[] data) throws Exception {
15-
if (data.length <= 1){
16-
throw new P2pException(TypeEnum.MESSAGE_WITH_WRONG_LENGTH, "len=" + data.length
17-
+ ", MessageType=" + (data.length == 1 ? MessageTypes.fromByte(data[0]) : "unknow"));
18-
}
1914
try {
2015
byte type = data[0];
2116
byte[] rawData = ArrayUtils.subarray(data, 1, data.length);

0 commit comments

Comments
 (0)