Skip to content

Commit 9028483

Browse files
committed
domain - ValidatorDesc - rename addr to id
1 parent 0d45045 commit 9028483

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sentry/src/domain/validator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::domain::BigNum;
55
#[derive(Serialize, Deserialize, Debug, Clone)]
66
#[serde(rename_all = "camelCase")]
77
pub struct ValidatorDesc {
8-
pub addr: String,
8+
pub id: String,
99
pub url: String,
1010
pub fee: BigNum,
1111
}
@@ -25,7 +25,7 @@ pub(crate) mod fixtures {
2525
let url = format!("http://{}-validator-url.com/validator", validator_id);
2626

2727
ValidatorDesc {
28-
addr: validator_id.to_string(),
28+
id: validator_id.to_string(),
2929
url,
3030
fee,
3131
}

sentry/src/infrastructure/persistence/channel/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl ChannelRepository for MemoryChannelRepository {
3838
Some(validator_id) => {
3939
// check if there is any validator in the current
4040
// `channel.spec.validators` that has the same `id`
41-
channel.spec.validators.iter().any(|validator| &validator.addr == validator_id)
41+
channel.spec.validators.iter().any(|validator| &validator.id == validator_id)
4242
}
4343
// if None -> the current channel has passed, since we don't need to filter by anything
4444
None => true,

0 commit comments

Comments
 (0)