@@ -68,8 +68,6 @@ pub(crate) type Responder<T> = oneshot::Sender<T>;
68
68
pub struct ServerInfo {
69
69
pub chain : ExtendedNetwork ,
70
70
pub tip : ChainAnchor ,
71
- pub blocks_height : u32 ,
72
- pub headers_height : u32 ,
73
71
}
74
72
75
73
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
@@ -403,7 +401,6 @@ pub struct RegisterParams {
403
401
pub struct RpcServerImpl {
404
402
wallet_manager : WalletManager ,
405
403
store : AsyncChainState ,
406
- rpc : BitcoinRpc ,
407
404
client : reqwest:: Client ,
408
405
}
409
406
@@ -650,11 +647,9 @@ impl WalletManager {
650
647
651
648
impl RpcServerImpl {
652
649
pub fn new ( store : AsyncChainState , wallet_manager : WalletManager ) -> Self {
653
- let rpc = wallet_manager. rpc . clone ( ) ;
654
650
RpcServerImpl {
655
651
wallet_manager,
656
652
store,
657
- rpc,
658
653
client : reqwest:: Client :: new ( ) ,
659
654
}
660
655
}
@@ -734,22 +729,7 @@ impl RpcServer for RpcServerImpl {
734
729
. get_tip ( )
735
730
. await
736
731
. map_err ( |error| ErrorObjectOwned :: owned ( -1 , error. to_string ( ) , None :: < String > ) ) ?;
737
- #[ derive( Deserialize ) ]
738
- struct Info {
739
- blocks : u32 ,
740
- headers : u32 ,
741
- }
742
- let info: Info = self
743
- . rpc
744
- . send_json ( & self . client , & self . rpc . get_blockchain_info ( ) )
745
- . await
746
- . map_err ( |error| ErrorObjectOwned :: owned ( -1 , error. to_string ( ) , None :: < String > ) ) ?;
747
- Ok ( ServerInfo {
748
- chain,
749
- tip,
750
- blocks_height : info. blocks ,
751
- headers_height : info. headers ,
752
- } )
732
+ Ok ( ServerInfo { chain, tip } )
753
733
}
754
734
755
735
async fn get_space (
0 commit comments