@@ -17,6 +17,7 @@ import (
17
17
"github.com/cosmos/relayer/v2/relayer/provider"
18
18
19
19
ctypes "github.com/cometbft/cometbft/rpc/core/types"
20
+ "github.com/cosmos/relayer/v2/relayer/chains"
20
21
"go.uber.org/zap"
21
22
"golang.org/x/sync/errgroup"
22
23
)
@@ -89,22 +90,22 @@ const (
89
90
// latestClientState is a map of clientID to the latest clientInfo for that client.
90
91
type latestClientState map [string ]provider.ClientState
91
92
92
- func (l latestClientState ) update (ctx context.Context , clientInfo clientInfo , ccp * CosmosChainProcessor ) {
93
- existingClientInfo , ok := l [clientInfo .clientID ]
93
+ func (l latestClientState ) update (ctx context.Context , clientInfo chains. ClientInfo , ccp * CosmosChainProcessor ) {
94
+ existingClientInfo , ok := l [clientInfo .ClientID ]
94
95
var trustingPeriod time.Duration
95
96
if ok {
96
- if clientInfo .consensusHeight .LT (existingClientInfo .ConsensusHeight ) {
97
+ if clientInfo .ConsensusHeight .LT (existingClientInfo .ConsensusHeight ) {
97
98
// height is less than latest, so no-op
98
99
return
99
100
}
100
101
trustingPeriod = existingClientInfo .TrustingPeriod
101
102
}
102
103
if trustingPeriod == 0 {
103
- cs , err := ccp .chainProvider .queryTMClientState (ctx , 0 , clientInfo .clientID )
104
+ cs , err := ccp .chainProvider .queryTMClientState (ctx , 0 , clientInfo .ClientID )
104
105
if err != nil {
105
106
ccp .log .Error (
106
107
"Failed to query client state to get trusting period" ,
107
- zap .String ("client_id" , clientInfo .clientID ),
108
+ zap .String ("client_id" , clientInfo .ClientID ),
108
109
zap .Error (err ),
109
110
)
110
111
return
@@ -114,7 +115,7 @@ func (l latestClientState) update(ctx context.Context, clientInfo clientInfo, cc
114
115
clientState := clientInfo .ClientState (trustingPeriod )
115
116
116
117
// update latest if no existing state or provided consensus height is newer
117
- l [clientInfo .clientID ] = clientState
118
+ l [clientInfo .ClientID ] = clientState
118
119
}
119
120
120
121
// Provider returns the ChainProvider, which provides the methods for querying, assembling IBC messages, and sending transactions.
@@ -467,7 +468,7 @@ func (ccp *CosmosChainProcessor) queryCycle(ctx context.Context, persistence *qu
467
468
// tx was not successful
468
469
continue
469
470
}
470
- messages := ibcMessagesFromEvents (ccp .log , tx .Events , chainID , heightUint64 , base64Encoded )
471
+ messages := chains . IbcMessagesFromEvents (ccp .log , tx .Events , chainID , heightUint64 , base64Encoded )
471
472
472
473
for _ , m := range messages {
473
474
ccp .handleMessage (ctx , m , ibcMessagesCache )
0 commit comments