From 41f211758cebe0a8df7dcf8167e3a50164643076 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Tue, 18 Jun 2024 22:17:35 +0900 Subject: [PATCH] fix getClientState to return state if latest height is 0 Signed-off-by: Jun Kimura --- contracts/LCPClientBase.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/LCPClientBase.sol b/contracts/LCPClientBase.sol index 876f6eb..7351c0d 100644 --- a/contracts/LCPClientBase.sol +++ b/contracts/LCPClientBase.sol @@ -328,7 +328,7 @@ abstract contract LCPClientBase is ILightClient, ILCPClientErrors { */ function getClientState(string calldata clientId) public view returns (bytes memory clientStateBytes, bool) { ProtoClientState.Data storage clientState = clientStorages[clientId].clientState; - if (clientState.latest_height.revision_height == 0) { + if (clientState.mrenclave.length == 0) { return (clientStateBytes, false); } return (LCPProtoMarshaler.marshal(clientState), true);