From 5ba20a94e833c2ae17556debf94139cafd3c1572 Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Mon, 14 May 2018 09:43:40 -0600 Subject: [PATCH] Panic on error to get same signature as transaction_count() --- src/thin_client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/thin_client.rs b/src/thin_client.rs index d2d73f3fc9..6b1678bc2f 100644 --- a/src/thin_client.rs +++ b/src/thin_client.rs @@ -125,7 +125,7 @@ impl ThinClient { /// Request the transaction count. If the response packet is dropped by the network, /// this method will hang. - pub fn server_transaction_count(&mut self) -> io::Result { + pub fn server_transaction_count(&mut self) -> u64 { info!("server_transaction_count"); let req = Request::GetTransactionCount; let data = @@ -135,14 +135,14 @@ impl ThinClient { .expect("buffer error in pub fn transaction_count"); let mut done = false; while !done { - let resp = self.recv_response()?; + let resp = self.recv_response().expect("transaction count dropped"); info!("recv_response {:?}", resp); if let &Response::TransactionCount { .. } = &resp { done = true; } self.process_response(resp); } - Ok(self.transaction_count) + self.transaction_count } /// Request the last Entry ID from the server. This method blocks