From 173c1fb6cfc4b9c291edfeda90e299e972d1c06e Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Mon, 8 Aug 2022 13:12:42 +0200 Subject: [PATCH] updating solomachine to use setClientState helper in update funcs (#1891) --- modules/light-clients/06-solomachine/update.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/light-clients/06-solomachine/update.go b/modules/light-clients/06-solomachine/update.go index 5eb628876c1..4594363a5af 100644 --- a/modules/light-clients/06-solomachine/update.go +++ b/modules/light-clients/06-solomachine/update.go @@ -8,7 +8,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v5/modules/core/24-host" "github.com/cosmos/ibc-go/v5/modules/core/exported" ) @@ -118,7 +117,7 @@ func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, client cs.Sequence++ cs.ConsensusState = consensusState - clientStore.Set(host.ClientStateKey(), clienttypes.MustMarshalClientState(cdc, &cs)) + setClientState(clientStore, cdc, &cs) return []exported.Height{clienttypes.NewHeight(0, cs.Sequence)} } @@ -137,5 +136,5 @@ func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ func (cs ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, _ exported.ClientMessage) { cs.IsFrozen = true - clientStore.Set(host.ClientStateKey(), clienttypes.MustMarshalClientState(cdc, &cs)) + setClientState(clientStore, cdc, &cs) }