// PKGPATH: gno.land/r/aib/main package main import ( "time" "gno.land/p/aib/ibc/lightclient" tmtesting "gno.land/p/aib/ibc/lightclient/tendermint/testing" "gno.land/p/aib/ibc/types" "gno.land/r/aib/ibc/core" ) type SoloMachine struct{} func (SoloMachine) ClientType() string { return lightclient.Solomachine } func (SoloMachine) ValidateBasic() error { return nil } // UpdateClient client type mismatch func main(cur realm) { // CreateClient and RegisterCounterparty var ( chainID = "chain-id-2" clientState = tmtesting.NewClientState(chainID, types.NewHeight(2, 2)) apphash = tmtesting.Hash("apphash") trustedValset = tmtesting.GenValset() consensusState = tmtesting.GenConsensusState(time.Now(), apphash, trustedValset.Hash()) ) clientID := core.CreateClient(cross(cur), clientState, consensusState) core.RegisterCounterparty(cross(cur), clientID, [][]byte{[]byte("iavlStoreKey"), []byte("prefix2")}, "07-tendermint-2") // Update clientID core.UpdateClient(cross(cur), clientID, SoloMachine{}) } // Error: // client type for client state and client message do not match