File tree 2 files changed +2
-2
lines changed 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ pub trait RpcApi: Sized {
443
443
self . call ( "getblockstats" , & [ height. into ( ) ] )
444
444
}
445
445
446
- fn get_block_stats_fields ( & self , height : u64 , fields : & Vec < json:: BlockStatsFields > ) -> Result < json:: GetBlockStatsResultPartial > {
446
+ fn get_block_stats_fields ( & self , height : u64 , fields : & [ json:: BlockStatsFields ] ) -> Result < json:: GetBlockStatsResultPartial > {
447
447
let fields: Vec < & str > = fields. iter ( )
448
448
. map ( |field| field. get_rpc_keyword ( ) )
449
449
. collect ( ) ;
Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ fn test_get_block_stats_fields(cl: &Client) {
324
324
let tip = cl. get_block_count ( ) . unwrap ( ) ;
325
325
let tip_hash = cl. get_best_block_hash ( ) . unwrap ( ) ;
326
326
let header = cl. get_block_header ( & tip_hash) . unwrap ( ) ;
327
- let fields = vec ! [ BlockStatsFields :: BlockHash , BlockStatsFields :: Height , BlockStatsFields :: TotalFee ] ;
327
+ let fields = [ BlockStatsFields :: BlockHash , BlockStatsFields :: Height , BlockStatsFields :: TotalFee ] ;
328
328
let stats = cl. get_block_stats_fields ( tip, & fields) . unwrap ( ) ;
329
329
assert_eq ! ( header. block_hash( ) , stats. block_hash. unwrap( ) ) ;
330
330
assert_eq ! ( tip, stats. height. unwrap( ) ) ;
You can’t perform that action at this time.
0 commit comments