File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
6
6
use serde_hex:: { SerHex , StrictPfx } ;
7
7
use std:: fmt;
8
8
9
- use crate :: Channel ;
10
9
use crate :: { BalancesMap , BigNum , DomainError } ;
11
10
use std:: convert:: TryFrom ;
12
11
@@ -56,22 +55,12 @@ impl TryFrom<&str> for ValidatorId {
56
55
}
57
56
}
58
57
59
- impl Into < String > for ValidatorId {
60
- fn into ( self ) -> String {
61
- hex:: encode ( self . 0 )
62
- }
63
- }
64
-
65
58
impl fmt:: Display for ValidatorId {
66
59
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
67
60
write ! ( f, "{}" , format!( "0x{}" , hex:: encode( self . 0 ) ) )
68
61
}
69
62
}
70
63
71
- pub trait Validator {
72
- fn tick ( & self , channel : Channel ) -> ValidatorFuture < ( ) > ;
73
- }
74
-
75
64
#[ derive( Serialize , Deserialize , Debug , Clone ) ]
76
65
#[ serde( rename_all = "camelCase" ) ]
77
66
pub struct ValidatorDesc {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ enum NewStateResult {
24
24
pub async fn tick < A : Adapter + ' static > ( iface : & SentryApi < A > ) -> Result < ( ) , Box < dyn Error > > {
25
25
let from = iface. channel . spec . validators . leader ( ) . id . clone ( ) ;
26
26
let new_msg_response = iface
27
- . get_latest_msg ( from. to_string ( ) , & [ "NewState" ] )
27
+ . get_latest_msg ( from. to_hex_prefix_string ( ) , & [ "NewState" ] )
28
28
. await ?;
29
29
let new_msg = match new_msg_response {
30
30
Some ( MessageTypes :: NewState ( new_state) ) => Some ( new_state) ,
You can’t perform that action at this time.
0 commit comments