Renamed DATA_FILE to ARBITRARY_DATA_FILE and GET_DATA_FILE to GET_ARBITRARY_DATA_FILE.

This will break existing data nodes, but this is okay, as nothing is in production yet.
This commit is contained in:
CalDescent 2021-08-14 13:57:44 +01:00
parent e99ea41117
commit b18b686545
5 changed files with 7 additions and 7 deletions

View File

@ -176,7 +176,7 @@ public class ArbitraryDataManager extends Thread {
arbitraryDataFileRequests.remove(hash58);
LOGGER.info(String.format("Removed hash %.8s from arbitraryDataFileRequests", hash58));
if (message == null || message.getType() != Message.MessageType.DATA_FILE) {
if (message == null || message.getType() != Message.MessageType.ARBITRARY_DATA_FILE) {
return null;
}

View File

@ -1246,7 +1246,7 @@ public class Controller extends Thread {
ArbitraryDataManager.getInstance().onNetworkArbitraryDataFileListMessage(peer, message);
break;
case GET_DATA_FILE:
case GET_ARBITRARY_DATA_FILE:
ArbitraryDataManager.getInstance().onNetworkGetDataFileMessage(peer, message);
break;

View File

@ -13,13 +13,13 @@ public class ArbitraryDataFileMessage extends Message {
private final ArbitraryDataFile arbitraryDataFile;
public ArbitraryDataFileMessage(ArbitraryDataFile arbitraryDataFile) {
super(MessageType.DATA_FILE);
super(MessageType.ARBITRARY_DATA_FILE);
this.arbitraryDataFile = arbitraryDataFile;
}
public ArbitraryDataFileMessage(int id, ArbitraryDataFile arbitraryDataFile) {
super(id, MessageType.DATA_FILE);
super(id, MessageType.ARBITRARY_DATA_FILE);
this.arbitraryDataFile = arbitraryDataFile;
}

View File

@ -18,7 +18,7 @@ public class GetArbitraryDataFileMessage extends Message {
}
private GetArbitraryDataFileMessage(int id, byte[] hash) {
super(id, MessageType.GET_DATA_FILE);
super(id, MessageType.GET_ARBITRARY_DATA_FILE);
this.hash = hash;
}

View File

@ -85,8 +85,8 @@ public abstract class Message {
BLOCKS(100),
GET_BLOCKS(101),
DATA_FILE(110),
GET_DATA_FILE(111),
ARBITRARY_DATA_FILE(110),
GET_ARBITRARY_DATA_FILE(111),
ARBITRARY_DATA_FILE_LIST(120),
GET_ARBITRARY_DATA_FILE_LIST(121);