safer istransaction test

This commit is contained in:
Craig Raw 2021-04-16 12:30:22 +02:00
parent a56f8971c0
commit 891499aff0

View file

@ -437,6 +437,9 @@ public class Transaction extends ChildMessage {
public static boolean isTransaction(byte[] bytes) {
//Incomplete quick test
if(bytes.length == 0) {
return false;
}
long version = Utils.readUint32(bytes, 0);
return version > 0 && version < 5;
}