Skip to content

Commit

Permalink
updating solomachine to use setClientState helper in update funcs (#1891
Browse files Browse the repository at this point in the history
)
  • Loading branch information
damiannolan authored Aug 8, 2022
1 parent 311a563 commit 173c1fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/light-clients/06-solomachine/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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)}
}
Expand All @@ -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)
}

0 comments on commit 173c1fb

Please sign in to comment.