This repository was archived by the owner on Oct 19, 2024. It is now read-only.
File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -565,12 +565,12 @@ pub trait Middleware: Sync + Send + Debug {
565
565
#[ cfg( feature = "celo" ) ]
566
566
#[ async_trait]
567
567
pub trait CeloMiddleware : Middleware {
568
- async fn get_validators_bls_public_keys (
568
+ async fn get_validators_bls_public_keys < T : Into < BlockId > + Send + Sync > (
569
569
& self ,
570
- block : Option < BlockId > ,
571
- ) -> Result < Vec < Vec < u8 > > , ProviderError > {
570
+ block_id : T ,
571
+ ) -> Result < Vec < String > , ProviderError > {
572
572
self . provider ( )
573
- . get_validators_bls_public_keys ( block )
573
+ . get_validators_bls_public_keys ( block_id )
574
574
. await
575
575
. map_err ( FromErr :: from)
576
576
}
Original file line number Diff line number Diff line change @@ -155,12 +155,12 @@ impl<P: JsonRpcClient> Provider<P> {
155
155
#[ cfg( feature = "celo" ) ]
156
156
#[ async_trait]
157
157
impl < P : JsonRpcClient > CeloMiddleware for Provider < P > {
158
- async fn get_validators_bls_public_keys (
158
+ async fn get_validators_bls_public_keys < T : Into < BlockId > + Send + Sync > (
159
159
& self ,
160
- block : Option < BlockId > ,
161
- ) -> Result < Vec < Vec < u8 > > , ProviderError > {
162
- let block = utils:: serialize ( & block . unwrap_or_else ( || BlockNumber :: Latest . into ( ) ) ) ;
163
- self . request ( "istanbul_getValidatorsBLSPublicKeys" , [ block ] )
160
+ block_id : T ,
161
+ ) -> Result < Vec < String > , ProviderError > {
162
+ let block_id = utils:: serialize ( & block_id . into ( ) ) ;
163
+ self . request ( "istanbul_getValidatorsBLSPublicKeys" , [ block_id ] )
164
164
. await
165
165
}
166
166
}
You can’t perform that action at this time.
0 commit comments