Skip to content

Commit

Permalink
strata-client: cleaned up a bunch more unused warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
delbonis committed Jan 28, 2025
1 parent 5dfd92b commit 20554d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
13 changes: 3 additions & 10 deletions bin/strata-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ use strata_consensus_logic::{
genesis,
sync_manager::{self, SyncManager},
};
use strata_db::{
traits::{BroadcastDatabase, ChainstateDatabase, Database},
DbError,
};
use strata_db::{traits::BroadcastDatabase, DbError};
use strata_eectl::engine::ExecEngineCtl;
use strata_evmexec::{engine::RpcExecEngineCtl, EngineRpcClient};
use strata_primitives::params::Params;
Expand All @@ -33,9 +30,7 @@ use strata_rpc_api::{
StrataAdminApiServer, StrataApiServer, StrataDebugApiServer, StrataSequencerApiServer,
};
use strata_status::StatusChannel;
use strata_storage::{
create_node_storage, ops::bridge_relay::BridgeMsgOps, L2BlockManager, NodeStorage,
};
use strata_storage::{create_node_storage, ops::bridge_relay::BridgeMsgOps, NodeStorage};
use strata_sync::{self, L2SyncContext, RpcSyncPeer};
use strata_tasks::{ShutdownSignal, TaskExecutor, TaskManager};
use tokio::{
Expand Down Expand Up @@ -235,7 +230,6 @@ pub struct CoreContext {
}

fn do_startup_checks(
database: &impl Database,
storage: &NodeStorage,
engine: &impl ExecEngineCtl,
bitcoin_client: &impl ReaderRpc,
Expand Down Expand Up @@ -277,7 +271,7 @@ fn do_startup_checks(

// Check that tip L2 block exists (and engine can be connected to)
let chain_tip = last_chain_state.chain_tip_blkid();
match engine.check_block_exists(chain_tip) {
match engine.check_block_exists(*chain_tip) {
Ok(true) => {
info!("startup: last l2 block is synced")
}
Expand Down Expand Up @@ -321,7 +315,6 @@ fn start_core_tasks(

// do startup checks
do_startup_checks(
database.as_ref(),
storage.as_ref(),
engine.as_ref(),
bitcoin_client.as_ref(),
Expand Down
5 changes: 2 additions & 3 deletions bin/strata-client/src/rpc_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bitcoin::{
secp256k1::{PublicKey, XOnlyPublicKey},
Transaction as BTransaction, Txid,
};
use futures::{FutureExt, TryFutureExt};
use futures::TryFutureExt;
use jsonrpsee::core::RpcResult;
use strata_bridge_relay::relayer::RelayerHandle;
use strata_btcio::{broadcaster::L1BroadcastHandle, writer::EnvelopeHandle};
Expand Down Expand Up @@ -362,7 +362,6 @@ impl<D: Database + Send + Sync + 'static> StrataApiServer for StrataRpcImpl<D> {

let prev_slot = l2_blk_bundle.block().header().header().blockidx() - 1;

let chain_state_db = self.database.clone();
let chain_state = self
.storage
.chainstate()
Expand Down Expand Up @@ -846,7 +845,7 @@ impl<D: Database + Sync + Send + 'static> StrataDebugApiServer for StrataDebugRp
.await?;
match chain_state {
Some(cs) => Ok(Some(RpcChainState {
tip_blkid: cs.chain_tip_blkid(),
tip_blkid: *cs.chain_tip_blkid(),
tip_slot: cs.chain_tip_slot(),
cur_epoch: cs.cur_epoch(),
})),
Expand Down

0 comments on commit 20554d0

Please sign in to comment.