Skip to content

Commit 074548f

Browse files
authored
Merge pull request #18 from datachainlab/fix-get-client-state
Fix getClientState to return state if latest height is 0 Signed-off-by: Jun Kimura <[email protected]>
2 parents 5ac4e18 + 41f2117 commit 074548f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contracts/LCPClientBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ abstract contract LCPClientBase is ILightClient, ILCPClientErrors {
328328
*/
329329
function getClientState(string calldata clientId) public view returns (bytes memory clientStateBytes, bool) {
330330
ProtoClientState.Data storage clientState = clientStorages[clientId].clientState;
331-
if (clientState.latest_height.revision_height == 0) {
331+
if (clientState.mrenclave.length == 0) {
332332
return (clientStateBytes, false);
333333
}
334334
return (LCPProtoMarshaler.marshal(clientState), true);

0 commit comments

Comments
 (0)