Skip to content

Commit f0cccdb

Browse files
committed
Revert "bitcoin node sync heights"
This reverts commit 95df5e8.
1 parent 95df5e8 commit f0cccdb

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

client/src/format.rs

-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ pub fn print_server_info(info: ServerInfo, format: Format) {
155155
println!("CHAIN: {}", info.chain);
156156
println!(" Height {}", info.tip.height);
157157
println!(" Hash {}", info.tip.hash);
158-
println!(" Blocks Height {}", info.blocks_height);
159-
println!(" Headers Height {}", info.headers_height);
160158
}
161159
Format::Json => {
162160
println!("{}", serde_json::to_string_pretty(&info).unwrap());

client/src/rpc.rs

+1-21
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ pub(crate) type Responder<T> = oneshot::Sender<T>;
6868
pub struct ServerInfo {
6969
pub chain: ExtendedNetwork,
7070
pub tip: ChainAnchor,
71-
pub blocks_height: u32,
72-
pub headers_height: u32,
7371
}
7472

7573
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -403,7 +401,6 @@ pub struct RegisterParams {
403401
pub struct RpcServerImpl {
404402
wallet_manager: WalletManager,
405403
store: AsyncChainState,
406-
rpc: BitcoinRpc,
407404
client: reqwest::Client,
408405
}
409406

@@ -650,11 +647,9 @@ impl WalletManager {
650647

651648
impl RpcServerImpl {
652649
pub fn new(store: AsyncChainState, wallet_manager: WalletManager) -> Self {
653-
let rpc = wallet_manager.rpc.clone();
654650
RpcServerImpl {
655651
wallet_manager,
656652
store,
657-
rpc,
658653
client: reqwest::Client::new(),
659654
}
660655
}
@@ -734,22 +729,7 @@ impl RpcServer for RpcServerImpl {
734729
.get_tip()
735730
.await
736731
.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 })
753733
}
754734

755735
async fn get_space(

0 commit comments

Comments
 (0)