From 377795bbf323f09bc6d723674f2a0a69eac12ac9 Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Wed, 20 Oct 2021 09:46:51 +0200 Subject: [PATCH] go/oasis-node/cmd: Add missing namespace to LatestStateRoot --- .changelog/4317.bugfix.2.md | 1 + go/oasis-node/cmd/node/control.go | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .changelog/4317.bugfix.2.md diff --git a/.changelog/4317.bugfix.2.md b/.changelog/4317.bugfix.2.md new file mode 100644 index 00000000000..e28c2288901 --- /dev/null +++ b/.changelog/4317.bugfix.2.md @@ -0,0 +1 @@ +go/oasis-node/cmd: Add missing namespace to LatestStateRoot diff --git a/go/oasis-node/cmd/node/control.go b/go/oasis-node/cmd/node/control.go index 2e6d3381c0e..9534ddc4b9f 100644 --- a/go/oasis-node/cmd/node/control.go +++ b/go/oasis-node/cmd/node/control.go @@ -104,9 +104,10 @@ func (n *Node) GetRuntimeStatus(ctx context.Context) (map[common.Namespace]contr status.LatestHash = blk.Header.EncodedHash() status.LatestTime = blk.Header.Timestamp status.LatestStateRoot = storage.Root{ - Version: blk.Header.Round, - Type: storage.RootTypeState, - Hash: blk.Header.StateRoot, + Namespace: blk.Header.Namespace, + Version: blk.Header.Round, + Type: storage.RootTypeState, + Hash: blk.Header.StateRoot, } default: n.logger.Error("failed to fetch latest runtime block",