mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 14:54:15 +00:00
Move min version for NotFoundMessage to a static member of that class.
This commit is contained in:
parent
7c9651a801
commit
9204c13233
@ -24,6 +24,8 @@ import java.util.List;
|
||||
* as an inventory message and lists the hashes of the missing items.
|
||||
*/
|
||||
public class NotFoundMessage extends InventoryMessage {
|
||||
public static int MIN_PROTOCOL_VERSION = 70001;
|
||||
|
||||
public NotFoundMessage(NetworkParameters params) {
|
||||
super(params);
|
||||
}
|
||||
@ -32,8 +34,8 @@ public class NotFoundMessage extends InventoryMessage {
|
||||
super(params, payloadBytes);
|
||||
}
|
||||
|
||||
public NotFoundMessage(NetworkParameters unitTestParams, List<InventoryItem> items) {
|
||||
super(unitTestParams);
|
||||
public NotFoundMessage(NetworkParameters params, List<InventoryItem> items) {
|
||||
super(params);
|
||||
this.items = new ArrayList<InventoryItem>(items);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
@ -1382,7 +1381,7 @@ public class Peer extends PeerSocketHandler {
|
||||
}
|
||||
|
||||
private boolean isNotFoundMessageSupported() {
|
||||
return vPeerVersionMessage.clientVersion >= 70001;
|
||||
return vPeerVersionMessage.clientVersion >= NotFoundMessage.MIN_PROTOCOL_VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user