From 2a1910502a7dd54014ce594f91667da142a2767a Mon Sep 17 00:00:00 2001 From: Lazy Nina Date: Fri, 12 Apr 2024 12:25:44 -0400 Subject: [PATCH] Add LatestView to CheckpointBlockInfo endpoint --- routes/transaction.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/routes/transaction.go b/routes/transaction.go index 09700621..ee7c128e 100644 --- a/routes/transaction.go +++ b/routes/transaction.go @@ -4360,9 +4360,10 @@ func (fes *APIServer) GetCommittedTipBlockInfo(ww http.ResponseWriter, req *http } // Return the block tip. if err := json.NewEncoder(ww).Encode(&lib.CheckpointBlockInfo{ - Height: blockTip.Header.Height, - Hash: blockTip.Hash, - HashHex: blockTip.Hash.String(), + Height: blockTip.Header.Height, + Hash: blockTip.Hash, + HashHex: blockTip.Hash.String(), + LatestView: fes.backendServer.GetLatestView(), }); err != nil { _AddBadRequestError(ww, "GetCommittedTipBlockInfo: Problem encoding response as JSON: "+err.Error()) return