Skip to content

Commit b9bfec1

Browse files
committed
rename counterparty methods
1 parent 6bbe295 commit b9bfec1

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

ibc-eureka-core/ics02-client/context/src/context.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ pub trait ClientValidationContext: Sized {
4141
height: &Height,
4242
) -> Result<(Timestamp, Height), HostError>;
4343

44-
fn counterparty_client(
44+
/// Returns the client identifier and the commitment prefix of the counterparty client.
45+
fn counterparty_meta(
4546
&self,
4647
client_id: &ClientId,
4748
) -> Result<(ClientId, CommitmentPrefix), HostError>;
@@ -105,12 +106,16 @@ pub trait ClientExecutionContext:
105106
/// Note that this timestamp is determined by the host.
106107
fn delete_update_meta(&mut self, client_id: ClientId, height: Height) -> Result<(), HostError>;
107108

108-
fn store_counterparty_client(
109+
/// Store the client identifier and the commitment prefix of the counterparty client.
110+
fn store_counterparty_meta(
109111
&self,
110112
client_id: &ClientId,
111113
counterparty_client_id: &ClientId,
112114
counterparty_prefix: &CommitmentPrefix,
113115
) -> Result<(), HostError>;
116+
117+
/// Delete the client identifier and the commitment prefix of the counterparty client.
118+
fn delete_counterparty_meta(&self, client_id: &ClientId) -> Result<(), HostError>;
114119
}
115120

116121
/// An optional trait that extends the client validation context capabilities by

ibc-eureka-core/ics04-channel/src/handler/acknowledgement.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ where
140140
let client_val_ctx_a = ctx_a.get_client_validation_context();
141141

142142
let (stored_id_source_client_on_target, target_prefix) =
143-
client_val_ctx_a.counterparty_client(id_target_client_on_source)?;
143+
client_val_ctx_a.counterparty_meta(id_target_client_on_source)?;
144144

145145
if &stored_id_source_client_on_target != id_source_client_on_target {
146146
return Err(ChannelError::MismatchCounterparty {

ibc-eureka-core/ics04-channel/src/handler/recv_packet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ where
146146
let client_val_ctx_b = ctx_b.get_client_validation_context();
147147

148148
let (stored_id_target_client_on_source, source_prefix) =
149-
client_val_ctx_b.counterparty_client(id_source_client_on_target)?;
149+
client_val_ctx_b.counterparty_meta(id_source_client_on_target)?;
150150

151151
if &stored_id_target_client_on_source != id_target_client_on_source {
152152
return Err(ChannelError::MismatchCounterparty {

ibc-eureka-core/ics04-channel/src/handler/send_packet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn send_packet_validate(
4343
let id_source_client_on_target: &ClientId = channel_source_client_on_target.as_ref();
4444

4545
let (stored_id_source_client_on_target, _) =
46-
client_val_ctx_a.counterparty_client(id_target_client_on_source)?;
46+
client_val_ctx_a.counterparty_meta(id_target_client_on_source)?;
4747

4848
if &stored_id_source_client_on_target != id_source_client_on_target {
4949
return Err(ChannelError::MismatchCounterparty {

ibc-eureka-core/ics04-channel/src/handler/timeout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ where
131131
let client_val_ctx_a = ctx_a.get_client_validation_context();
132132

133133
let (stored_id_source_client_on_target, target_prefix) =
134-
client_val_ctx_a.counterparty_client(id_target_client_on_source)?;
134+
client_val_ctx_a.counterparty_meta(id_target_client_on_source)?;
135135

136136
if &stored_id_source_client_on_target != id_source_client_on_target {
137137
return Err(ChannelError::MismatchCounterparty {

0 commit comments

Comments
 (0)