From eaa9ce30e50510259c8aae3e6ad73cb30b58655e Mon Sep 17 00:00:00 2001
From: Philip Offtermatt
Date: Tue, 10 Oct 2023 10:27:12 +0200
Subject: [PATCH] Fix: return the block from storage, not the latest block
---
cometmock/rpc_server/routes.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cometmock/rpc_server/routes.go b/cometmock/rpc_server/routes.go
index 976993b..86c272b 100644
--- a/cometmock/rpc_server/routes.go
+++ b/cometmock/rpc_server/routes.go
@@ -622,7 +622,7 @@ func Block(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlock, error)
return nil, err
}
- return &ctypes.ResultBlock{BlockID: *blockID, Block: abci_client.GlobalClient.LastBlock}, nil
+ return &ctypes.ResultBlock{BlockID: *blockID, Block: block}, nil
}
// BlockResults gets ABCIResults at a given height.