From c7f8bd29a94fd066d56b874773a4189e32dcd26c Mon Sep 17 00:00:00 2001 From: Aditya Sripal Date: Fri, 30 Apr 2021 16:00:14 -0400 Subject: [PATCH] document in go code --- modules/core/02-client/keeper/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/02-client/keeper/client.go b/modules/core/02-client/keeper/client.go index b1220597e4a..c44d6c70f6f 100644 --- a/modules/core/02-client/keeper/client.go +++ b/modules/core/02-client/keeper/client.go @@ -68,6 +68,8 @@ func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, header exported.H eventType := types.EventTypeUpdateClient + // Any writes made in CheckHeaderAndUpdateState are persisted on both valid updates and misbehaviour updates. + // Light client implementations are responsible for writing the correct metadata (if any) in either case. newClientState, newConsensusState, err := clientState.CheckHeaderAndUpdateState(ctx, k.cdc, k.ClientStore(ctx, clientID), header) if err != nil { return sdkerrors.Wrapf(err, "cannot update client with ID %s", clientID)