mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Add commitHash entry
This commit is contained in:
parent
37170abfd5
commit
77666a6d64
4 changed files with 7 additions and 0 deletions
|
@ -27,6 +27,7 @@ import bisq.core.dao.state.DaoStateService;
|
|||
import bisq.core.network.p2p.inventory.messages.GetInventoryRequest;
|
||||
import bisq.core.network.p2p.inventory.messages.GetInventoryResponse;
|
||||
import bisq.core.network.p2p.inventory.model.InventoryItem;
|
||||
import bisq.core.network.p2p.inventory.model.RequestInfo;
|
||||
|
||||
import bisq.network.p2p.network.Connection;
|
||||
import bisq.network.p2p.network.MessageListener;
|
||||
|
@ -144,6 +145,7 @@ public class GetInventoryRequestHandler implements MessageListener {
|
|||
|
||||
// node
|
||||
inventory.put(InventoryItem.version, Version.VERSION);
|
||||
inventory.put(InventoryItem.commitHash, RequestInfo.COMMIT_HASH);
|
||||
inventory.put(InventoryItem.usedMemory, String.valueOf(Profiler.getUsedMemoryInBytes()));
|
||||
inventory.put(InventoryItem.jvmStartTime, String.valueOf(ManagementFactory.getRuntimeMXBean().getStartTime()));
|
||||
|
||||
|
|
|
@ -122,6 +122,7 @@ public enum InventoryItem {
|
|||
|
||||
// No deviation check
|
||||
version("version", false),
|
||||
commitHash("commitHash", false),
|
||||
usedMemory("usedMemory", true),
|
||||
jvmStartTime("jvmStartTime", true);
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
@Getter
|
||||
public class RequestInfo {
|
||||
// Carries latest commit hash of feature changes (not latest commit as that is then the commit for editing that field)
|
||||
public static final String COMMIT_HASH = "37170abf";
|
||||
|
||||
private final long requestStartTime;
|
||||
@Setter
|
||||
private long responseTime;
|
||||
|
|
|
@ -158,6 +158,7 @@ public class InventoryWebServer {
|
|||
|
||||
if (requestInfo != null) {
|
||||
sb.append("Version: ").append(requestInfo.getDisplayValue(InventoryItem.version)).append("<br/>");
|
||||
sb.append("Commit hash: ").append(requestInfo.getDisplayValue(InventoryItem.commitHash)).append("<br/>");
|
||||
String memory = requestInfo.getValue(InventoryItem.usedMemory);
|
||||
String memoryString = memory != null ? Utilities.readableFileSize(Long.parseLong(memory)) : "n/a";
|
||||
sb.append("Memory used: ")
|
||||
|
|
Loading…
Add table
Reference in a new issue