From 5aa86d91377526012cea7509dc6684ecf6457ff2 Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Tue, 11 Oct 2022 12:16:43 +0200 Subject: [PATCH] go/control: Omit empty runtimes and pending upgrades --- .changelog/4975.trivial.md | 0 go/control/api/api.go | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .changelog/4975.trivial.md diff --git a/.changelog/4975.trivial.md b/.changelog/4975.trivial.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/go/control/api/api.go b/go/control/api/api.go index 1923cb3fd39..988ebf9b2db 100644 --- a/go/control/api/api.go +++ b/go/control/api/api.go @@ -70,7 +70,7 @@ type Status struct { Consensus consensus.Status `json:"consensus"` // Runtimes is the status overview for each runtime supported by the node. - Runtimes map[common.Namespace]RuntimeStatus `json:"runtimes"` + Runtimes map[common.Namespace]RuntimeStatus `json:"runtimes,omitempty"` // Registration is the node's registration status. Registration RegistrationStatus `json:"registration"` @@ -79,7 +79,7 @@ type Status struct { Keymanager *keymanagerWorker.Status `json:"keymanager,omitempty"` // PendingUpgrades are the node's pending upgrades. - PendingUpgrades []*upgrade.PendingUpgrade `json:"pending_upgrades"` + PendingUpgrades []*upgrade.PendingUpgrade `json:"pending_upgrades,omitempty"` } // DebugStatus is the current node debug status, listing the various node