mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +00:00
safer istransaction test
This commit is contained in:
parent
a56f8971c0
commit
891499aff0
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue