Skip to content

Commit 4835b16

Browse files
committed
Fix various unused warnings in test and regular builds
1 parent f6a4505 commit 4835b16

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, COINBASE_MATURITY, ChannelPhase};

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
@@ -62,7 +62,6 @@ use regex;
6262
use crate::io;
6363
use crate::prelude::*;
6464
use core::cell::RefCell;
65-
use core::ops::Deref;
6665
use core::time::Duration;
6766
use crate::sync::{Mutex, Arc};
6867
use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
@@ -297,6 +296,7 @@ pub(crate) struct WatchtowerPersister {
297296
}
298297

299298
impl WatchtowerPersister {
299+
#[cfg(test)]
300300
pub(crate) fn new(destination_script: Script) -> Self {
301301
WatchtowerPersister {
302302
persister: TestPersister::new(),
@@ -306,6 +306,7 @@ impl WatchtowerPersister {
306306
}
307307
}
308308

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

0 commit comments

Comments
 (0)