z9b_recover_client_filetest.gno
0.83 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// RecoverClient failure: subject client not found.
13func main(cur realm) {
14 core.SetAdmin(cross(cur), "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm")
15 core.AddRelayer(cross(cur), "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm")
16 var (
17 clientState = tmtesting.NewClientState("chain-id-2", types.NewHeight(2, 2))
18 trustedValset = tmtesting.GenValset()
19 consensusState = tmtesting.GenConsensusState(time.Now(), tmtesting.Hash("apphash"), trustedValset.Hash())
20 )
21 substituteID := core.CreateClient(cross(cur), clientState, consensusState)
22
23 core.RecoverClient(cross(cur), "07-tendermint-99", substituteID)
24}
25
26// Error:
27// subject client 07-tendermint-99 not found