Skip to content

Commit 4468def

Browse files
committed
Fix various unused warnings in test and regular builds
1 parent 61d896d commit 4468def

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lightning/src/ln/functional_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::chain::chaininterface::LowerBoundedFeeEstimator;
1717
use crate::chain::channelmonitor;
1818
use crate::chain::channelmonitor::{CLTV_CLAIM_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS, ANTI_REORG_DELAY};
1919
use crate::chain::transaction::OutPoint;
20-
use crate::sign::{ChannelSigner, EcdsaChannelSigner, EntropySource, SignerProvider};
20+
use crate::sign::{EcdsaChannelSigner, EntropySource, SignerProvider};
2121
use crate::events::{Event, MessageSendEvent, MessageSendEventsProvider, PathFailure, PaymentPurpose, ClosureReason, HTLCDestination, PaymentFailureReason};
2222
use crate::ln::{ChannelId, PaymentPreimage, PaymentSecret, PaymentHash};
2323
use crate::ln::channel::{commitment_tx_base_weight, COMMITMENT_TX_WEIGHT_PER_HTLC, CONCURRENT_INBOUND_HTLC_FEE_BUFFER, FEE_SPIKE_BUFFER_FEE_INCREASE_MULTIPLE, MIN_AFFORDABLE_HTLC_COUNT, get_holder_selected_channel_reserve_satoshis, OutboundV1Channel, InboundV1Channel};

lightning/src/ln/shutdown_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ fn test_lnd_bug_6039() {
209209
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
210210
let chan = create_announced_chan_between_nodes(&nodes, 0, 1);
211211

212-
let (payment_preimage, payment_hash, _) = route_payment(&nodes[0], &[&nodes[1]], 100_000);
212+
let (payment_preimage, _, _) = route_payment(&nodes[0], &[&nodes[1]], 100_000);
213213

214214
nodes[0].node.close_channel(&chan.2, &nodes[1].node.get_our_node_id()).unwrap();
215215
let node_0_shutdown = get_event_msg!(nodes[0], MessageSendEvent::SendShutdown, nodes[1].node.get_our_node_id());

lightning/src/util/test_utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ use regex;
6161
use crate::io;
6262
use crate::prelude::*;
6363
use core::cell::RefCell;
64-
use core::ops::Deref;
6564
use core::time::Duration;
6665
use crate::sync::{Mutex, Arc};
6766
use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
@@ -296,6 +295,7 @@ pub(crate) struct WatchtowerPersister {
296295
}
297296

298297
impl WatchtowerPersister {
298+
#[cfg(test)]
299299
pub(crate) fn new(destination_script: Script) -> Self {
300300
WatchtowerPersister {
301301
persister: TestPersister::new(),
@@ -305,6 +305,7 @@ impl WatchtowerPersister {
305305
}
306306
}
307307

308+
#[cfg(test)]
308309
pub(crate) fn justice_tx(&self, funding_txo: OutPoint, commitment_txid: &Txid)
309310
-> Option<Transaction> {
310311
self.watchtower_state.lock().unwrap().get(&funding_txo).unwrap().get(commitment_txid).cloned()

0 commit comments

Comments
 (0)