Skip to content

Commit a3b4b6f

Browse files
committed
fix: remove ToString trait ValidatorId
1 parent 585c93e commit a3b4b6f

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

primitives/src/validator.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
66
use serde_hex::{SerHex, StrictPfx};
77
use std::fmt;
88

9-
use crate::Channel;
109
use crate::{BalancesMap, BigNum, DomainError};
1110
use std::convert::TryFrom;
1211

@@ -56,22 +55,12 @@ impl TryFrom<&str> for ValidatorId {
5655
}
5756
}
5857

59-
impl Into<String> for ValidatorId {
60-
fn into(self) -> String {
61-
hex::encode(self.0)
62-
}
63-
}
64-
6558
impl fmt::Display for ValidatorId {
6659
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6760
write!(f, "{}", format!("0x{}", hex::encode(self.0)))
6861
}
6962
}
7063

71-
pub trait Validator {
72-
fn tick(&self, channel: Channel) -> ValidatorFuture<()>;
73-
}
74-
7564
#[derive(Serialize, Deserialize, Debug, Clone)]
7665
#[serde(rename_all = "camelCase")]
7766
pub struct ValidatorDesc {

validator_worker/src/follower.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ enum NewStateResult {
2424
pub async fn tick<A: Adapter + 'static>(iface: &SentryApi<A>) -> Result<(), Box<dyn Error>> {
2525
let from = iface.channel.spec.validators.leader().id.clone();
2626
let new_msg_response = iface
27-
.get_latest_msg(from.to_string(), &["NewState"])
27+
.get_latest_msg(from.to_hex_prefix_string(), &["NewState"])
2828
.await?;
2929
let new_msg = match new_msg_response {
3030
Some(MessageTypes::NewState(new_state)) => Some(new_state),

0 commit comments

Comments
 (0)