z2b_update_client_filetest.gno
0.71 Kb · 31 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// UpdateClient w/o existing client
13func main(cur realm) {
14 var (
15 clientID = "07-tendermint-1"
16 chainID = "chain-id-2"
17 apphash = tmtesting.Hash("apphash")
18 latestHeight = types.Height{2, 3}
19 newHeight = uint64(5)
20 newTimestamp = time.Now()
21 valset = tmtesting.GenValset()
22 msgHeader = tmtesting.GenMsgHeader(
23 chainID, newTimestamp, apphash, newHeight, latestHeight, valset, valset, valset,
24 )
25 )
26
27 core.UpdateClient(cross(cur), clientID, msgHeader)
28}
29
30// Error:
31// client 07-tendermint-1 not found