Skip to content

Commit 77c1036

Browse files
committed
chore: remove dead code, fix unit test build
1 parent fd4c237 commit 77c1036

File tree

2 files changed

+1
-43
lines changed

2 files changed

+1
-43
lines changed

stacks-signer/src/client/stacks_client.rs

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::collections::VecDeque;
21
// Copyright (C) 2013-2020 Blockstack PBC, a public benefit corporation
32
// Copyright (C) 2020-2024 Stacks Open Internet Foundation
43
//
@@ -14,6 +13,7 @@ use std::collections::VecDeque;
1413
//
1514
// You should have received a copy of the GNU General Public License
1615
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
use std::collections::VecDeque;
1717
use std::net::SocketAddr;
1818

1919
use blockstack_lib::burnchains::Txid;
@@ -534,47 +534,6 @@ impl StacksClient {
534534
})
535535
}
536536

537-
/// Get the sortition information for the latest sortition
538-
pub fn get_latest_sortition(&self) -> Result<SortitionInfo, ClientError> {
539-
debug!("stacks_node_client: Getting latest sortition...");
540-
let path = self.sortition_info_path();
541-
let timer = crate::monitoring::new_rpc_call_timer(&path, &self.http_origin);
542-
let send_request = || {
543-
self.stacks_node_client.get(&path).send().map_err(|e| {
544-
warn!("Signer failed to request latest sortition"; "err" => ?e);
545-
e
546-
})
547-
};
548-
let response = send_request()?;
549-
timer.stop_and_record();
550-
if !response.status().is_success() {
551-
return Err(ClientError::RequestFailure(response.status()));
552-
}
553-
let sortition_info = response.json()?;
554-
Ok(sortition_info)
555-
}
556-
557-
/// Get the sortition information for a given sortition
558-
pub fn get_sortition(&self, ch: &ConsensusHash) -> Result<SortitionInfo, ClientError> {
559-
debug!("stacks_node_client: Getting sortition with consensus hash {ch}...");
560-
let path = format!("{}/consensus/{}", self.sortition_info_path(), ch.to_hex());
561-
let timer_label = format!("{}/consensus/:consensus_hash", self.sortition_info_path());
562-
let timer = crate::monitoring::new_rpc_call_timer(&timer_label, &self.http_origin);
563-
let send_request = || {
564-
self.stacks_node_client.get(&path).send().map_err(|e| {
565-
warn!("Signer failed to request sortition"; "consensus_hash" => %ch, "err" => ?e);
566-
e
567-
})
568-
};
569-
let response = send_request()?;
570-
timer.stop_and_record();
571-
if !response.status().is_success() {
572-
return Err(ClientError::RequestFailure(response.status()));
573-
}
574-
let sortition_info = response.json()?;
575-
Ok(sortition_info)
576-
}
577-
578537
/// Get the current peer info data from the stacks node
579538
pub fn get_peer_info(&self) -> Result<PeerInfo, ClientError> {
580539
debug!("stacks_node_client: Getting peer info...");

stacks-signer/src/tests/chainstate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ fn setup_test_environment(
8282
});
8383

8484
let view = SortitionsView {
85-
latest_consensus_hash: cur_sortition.consensus_hash,
8685
cur_sortition,
8786
last_sortition,
8887
config: ProposalEvalConfig {

0 commit comments

Comments
 (0)