Skip to content

Commit c3c4bf2

Browse files
randomloginclaude
andcommitted
electrum: drop unused config from ElectrumRuntimeClient
The fee-rate cache update moved into a free function that takes `network` directly, so the client no longer reads its `config` field. This tripped `dead_code` under `-D warnings` in CI. Remove the field and the argument threaded through `start`/`new`. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 7ef2646 commit c3c4bf2

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

‎src/chain/electrum.rs‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ impl ElectrumChainSource {
8989
self.server_url.clone(),
9090
self.sync_config.clone(),
9191
Arc::clone(&runtime),
92-
Arc::clone(&self.config),
9392
Arc::clone(&self.logger),
9493
)
9594
}
@@ -430,15 +429,14 @@ impl ElectrumRuntimeStatus {
430429

431430
pub(super) fn start(
432431
&mut self, server_url: String, sync_config: ElectrumSyncConfig, runtime: Arc<Runtime>,
433-
config: Arc<Config>, logger: Arc<Logger>,
432+
logger: Arc<Logger>,
434433
) -> Result<(), Error> {
435434
if self.client.is_some() {
436435
debug_assert!(false, "We shouldn't call start if we're already started");
437436
return Ok(());
438437
}
439438

440-
let client =
441-
Arc::new(ElectrumRuntimeClient::new(server_url, sync_config, runtime, config, logger)?);
439+
let client = Arc::new(ElectrumRuntimeClient::new(server_url, sync_config, runtime, logger)?);
442440

443441
// (Re-)apply all known `Filter` entries to the fresh client.
444442
for (txid, script_pubkey) in self.registered_txs.iter() {
@@ -487,15 +485,14 @@ struct ElectrumRuntimeClient {
487485
bdk_electrum_client: Arc<BdkElectrumClient<Arc<ElectrumClient>>>,
488486
tx_sync: Arc<ElectrumSyncClient<Arc<Logger>>>,
489487
runtime: Arc<Runtime>,
490-
config: Arc<Config>,
491488
logger: Arc<Logger>,
492489
confirm_gate: Arc<ConfirmGate>,
493490
}
494491

495492
impl ElectrumRuntimeClient {
496493
fn new(
497494
server_url: String, sync_config: ElectrumSyncConfig, runtime: Arc<Runtime>,
498-
config: Arc<Config>, logger: Arc<Logger>,
495+
logger: Arc<Logger>,
499496
) -> Result<Self, Error> {
500497
let electrum_config = ElectrumConfigBuilder::new()
501498
.retry(ELECTRUM_CLIENT_NUM_RETRIES)
@@ -524,7 +521,6 @@ impl ElectrumRuntimeClient {
524521
bdk_electrum_client,
525522
tx_sync,
526523
runtime,
527-
config,
528524
logger,
529525
confirm_gate: Arc::new(ConfirmGate::new()),
530526
})

0 commit comments

Comments
 (0)