@@ -135,15 +135,15 @@ func (k Keeper) DisableAllChannels(ctx sdk.Context) {
135
135
136
136
// SetCounterpartyAddress maps the destination chain relayer address to the source relayer address
137
137
// The receiving chain must store the mapping from: address -> counterpartyAddress for the given channel
138
- func (k Keeper ) SetCounterpartyAddress (ctx sdk.Context , address , counterpartyAddress string ) {
138
+ func (k Keeper ) SetCounterpartyAddress (ctx sdk.Context , address , counterpartyAddress , channelID string ) {
139
139
store := ctx .KVStore (k .storeKey )
140
- store .Set (types .KeyRelayerAddress (address ), []byte (counterpartyAddress ))
140
+ store .Set (types .KeyRelayerAddress (address , channelID ), []byte (counterpartyAddress ))
141
141
}
142
142
143
143
// GetCounterpartyAddress gets the relayer counterparty address given a destination relayer address
144
- func (k Keeper ) GetCounterpartyAddress (ctx sdk.Context , address string ) (string , bool ) {
144
+ func (k Keeper ) GetCounterpartyAddress (ctx sdk.Context , address , channelID string ) (string , bool ) {
145
145
store := ctx .KVStore (k .storeKey )
146
- key := types .KeyRelayerAddress (address )
146
+ key := types .KeyRelayerAddress (address , channelID )
147
147
148
148
if ! store .Has (key ) {
149
149
return "" , false
@@ -166,6 +166,7 @@ func (k Keeper) GetAllRelayerAddresses(ctx sdk.Context) []*types.RegisteredRelay
166
166
addr := & types.RegisteredRelayerAddress {
167
167
Address : keySplit [1 ],
168
168
CounterpartyAddress : string (iterator .Value ()),
169
+ ChannelId : keySplit [2 ],
169
170
}
170
171
171
172
registeredAddrArr = append (registeredAddrArr , addr )
0 commit comments