z1d_create_client_filetest.gno
0.70 Kb · 27 lines
1// PKGPATH: gno.land/r/aib/main
2package main
3
4import (
5 "time"
6
7 tmtesting "gno.land/p/aib/ibc/lightclient/tendermint/testing"
8 "gno.land/p/aib/ibc/types"
9 "gno.land/r/aib/ibc/core"
10)
11
12// CreateClient with Status Frozen
13func main(cur realm) {
14 var (
15 chainID = "chain-id-2"
16 clientState = tmtesting.NewClientState(chainID, types.NewHeight(2, 2))
17 apphash = tmtesting.Hash("apphash")
18 trustedValset = tmtesting.GenValset()
19 consensusState = tmtesting.GenConsensusState(time.Now(), apphash, trustedValset.Hash())
20 )
21 clientState.FrozenHeight = types.Height{2, 1}
22
23 core.CreateClient(cross(cur), clientState, consensusState)
24}
25
26// Error:
27// cannot create client (07-tendermint-1) with status Frozen