Search Apps Documentation Source Content File Folder Download Copy Actions Download

z1f_create_client_filetest.gno

0.58 Kb · 27 lines
 1// PKGPATH: gno.land/r/aib/main
 2package main
 3
 4import (
 5	"gno.land/p/aib/ibc/lightclient"
 6	"gno.land/p/aib/ibc/lightclient/tendermint/testing"
 7	"gno.land/p/aib/ibc/types"
 8	"gno.land/r/aib/ibc/core"
 9)
10
11type SoloMachine struct{}
12
13func (SoloMachine) ClientType() string {
14	return lightclient.Solomachine
15}
16
17func (SoloMachine) ValidateBasic() error {
18	return nil
19}
20
21// CreateClient w/ client type mismatch
22func main(cur realm) {
23	core.CreateClient(cross(cur), testing.NewClientState("chainid", types.Height{}), SoloMachine{})
24}
25
26// Error:
27// client type for client state and consensus state do not match